Mathematics for Computer Science

Similar documents
[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of

MATRICES AND MATRIX OPERATIONS

Phys 201. Matrices and Determinants

Introduction. Vectors and Matrices. Vectors [1] Vectors [2]

Inverting Matrices. 1 Properties of Transpose. 2 Matrix Algebra. P. Danziger 3.2, 3.3

Knowledge Discovery and Data Mining 1 (VO) ( )

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

Prepared by: M. S. KumarSwamy, TGT(Maths) Page

Matrices and Linear Algebra

Computational Foundations of Cognitive Science. Definition of the Inverse. Definition of the Inverse. Definition Computation Properties

Linear Algebra V = T = ( 4 3 ).

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT

Lecture 3: Matrix and Matrix Operations

* is a row matrix * An mxn matrix is a square matrix if and only if m=n * A= is a diagonal matrix if = 0 i

INSTITIÚID TEICNEOLAÍOCHTA CHEATHARLACH INSTITUTE OF TECHNOLOGY CARLOW MATRICES

CLASS 12 ALGEBRA OF MATRICES

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

Fundamentals of Engineering Analysis (650163)

CP3 REVISION LECTURES VECTORS AND MATRICES Lecture 1. Prof. N. Harnew University of Oxford TT 2013

Introduction to Quantitative Techniques for MSc Programmes SCHOOL OF ECONOMICS, MATHEMATICS AND STATISTICS MALET STREET LONDON WC1E 7HX

CS 246 Review of Linear Algebra 01/17/19

Introduction to Matrix Algebra

Basic concepts of data assimilation

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Computational Foundations of Cognitive Science. Addition and Scalar Multiplication. Matrix Multiplication

Review of Linear Algebra

Chapter 2 Notes, Linear Algebra 5e Lay

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix

. a m1 a mn. a 1 a 2 a = a n

Math 360 Linear Algebra Fall Class Notes. a a a a a a. a a a

3 Matrix Algebra. 3.1 Operations on matrices

Elementary Row Operations on Matrices

Matrices A brief introduction

ENGI 9420 Lecture Notes 2 - Matrix Algebra Page Matrix operations can render the solution of a linear system much more efficient.

Elementary maths for GMT

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Linear Algebra (Review) Volker Tresp 2017

MATH2210 Notebook 2 Spring 2018

MATH Mathematics for Agriculture II

Chapter 7. Linear Algebra: Matrices, Vectors,

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

Matrices A brief introduction

Math 313 Chapter 1 Review

1 Matrices and Systems of Linear Equations. a 1n a 2n

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

MATRICES The numbers or letters in any given matrix are called its entries or elements

Linear Algebra and Matrix Inversion

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Matrices. 1 a a2 1 b b 2 1 c c π

Matrices. Chapter Definitions and Notations

Linear Algebra March 16, 2019

Introduction Eigen Values and Eigen Vectors An Application Matrix Calculus Optimal Portfolio. Portfolios. Christopher Ting.

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

TOPIC III LINEAR ALGEBRA

Section 12.4 Algebra of Matrices

Things we can already do with matrices. Unit II - Matrix arithmetic. Defining the matrix product. Things that fail in matrix arithmetic

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88

n n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full

For comments, corrections, etc Please contact Ahnaf Abbas: Sharjah Institute of Technology. Matrices Handout #8.

10-701/ Recitation : Linear Algebra Review (based on notes written by Jing Xiang)

Matrix operations Linear Algebra with Computer Science Application

2. Linear algebra. matrices and vectors. linear equations. range and nullspace of matrices. function of vectors, gradient and Hessian

Lecture 15 Review of Matrix Theory III. Dr. Radhakant Padhi Asst. Professor Dept. of Aerospace Engineering Indian Institute of Science - Bangalore

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Matrices. Math 240 Calculus III. Wednesday, July 10, Summer 2013, Session II. Matrices. Math 240. Definitions and Notation.

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Matrix Arithmetic

DM559 Linear and Integer Programming. Lecture 3 Matrix Operations. Marco Chiarandini

Lecture 1 Review: Linear models have the form (in matrix notation) Y = Xβ + ε,

Linear Algebra (Review) Volker Tresp 2018

MA 1B ANALYTIC - HOMEWORK SET 7 SOLUTIONS

SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear Algebra

Symmetric and anti symmetric matrices

Matrices BUSINESS MATHEMATICS

A Quick Tour of Linear Algebra and Optimization for Machine Learning

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:

L. Vandenberghe EE133A (Spring 2017) 3. Matrices. notation and terminology. matrix operations. linear and affine functions.

Matrices and Matrix Algebra.

Lecture notes on Quantum Computing. Chapter 1 Mathematical Background

7 Matrix Operations. 7.0 Matrix Multiplication + 3 = 3 = 4

6.1 Matrices. Definition: A Matrix A is a rectangular array of the form. A 11 A 12 A 1n A 21. A 2n. A m1 A m2 A mn A 22.

Arrays: Vectors and Matrices

Math 110: Worksheet 1 Solutions

MATH 323 Linear Algebra Lecture 6: Matrix algebra (continued). Determinants.

Review of linear algebra

Linear Algebra Homework and Study Guide

MATRICES. knowledge on matrices Knowledge on matrix operations. Matrix as a tool of solving linear equations with two or three unknowns.

Chapter 1. Matrix Algebra

Conceptual Questions for Review

Exercise Set Suppose that A, B, C, D, and E are matrices with the following sizes: A B C D E

Linear Equations and Matrix

Fall Inverse of a matrix. Institute: UC San Diego. Authors: Alexander Knop

Notes on Mathematics

MATHEMATICS. IMPORTANT FORMULAE AND CONCEPTS for. Final Revision CLASS XII CHAPTER WISE CONCEPTS, FORMULAS FOR QUICK REVISION.

Matrix Algebra. Matrix Algebra. Chapter 8 - S&B

Basic Math Review for CS4830

MATH 1210 Assignment 4 Solutions 16R-T1

Matrices and systems of linear equations

Massachusetts Institute of Technology Department of Economics Statistics. Lecture Notes on Matrix Algebra

Transcription:

Mathematics for Computer Science w11 Algebra of Matrices matrix definition, geometric interpretation, determinant, inverse, orthogonal, system of linear equations Summary and Figures from : Linear Algebra (5th Ed) : 612 Solved Problems by Seymour Lipschutz, Marc Lipson Schaum's Outline ISBN-10: 0071794565 Definition : A matrix A over field K (usually R) is a rectangular array of scalars, usually presented as : (columns) (c1) (c2)... (cn) a11 a12... a1n (r1) a21 a22... a2n (r2) A =... (rows) am1 am2... amn (rn) A = [aij], i=1...m, j=1...n aij is the element in the i-row and j-column. m rows, n columns. (m, n) is the size of A. A = B if they are the same size and aij = bij for all i, j O = [0ij] zero matrix Matrix Addition and Scalar Multiplication (similar to vectors in Rn) Addition A = [aij] B = [bij] A + B = [aij + bij] (same size only!)

Scalar Multiplication A = [aij] k e R ka = [k*aij] also : -A = (-1)A A - B = A + (-B) Linear combination A, B e matrices (same size) k1, k2 e R C = k1a + k2b (linear combination of A and B) THEOREM 2.1: Consider any matrices A, B, C (with the same size) and any scalars k and k1. Then (similar to vectors in Rn) (i) (A + B) + C = A + (B + C) v) k(a + B) = ka + kb (ii) A + 0 = 0 + A = A vi) (k + k1)a = ka + k1a (iii) A + (-A) = (-A) + A = 0 vii) (kk1)a = k(k1a) (iv) A + B = B + A viii) 1A = A Summation simbol (sigma)!!!! f(k) = f(1) + f(2) + + f(n) k is the index, 1 and n are the lower and upper limits, respectively. more generaly, n1, n2 limits!!!!!! f(k) = f(n1) + f(n1+1) + + f(n2) Matrix Multiplication (simple case) A = [a11 a21... a2m] B = [b11 b21... bm1] AB = a11*b11 + a21*b21 +... a2m*bm1 (scalar or 1x1 matrix)

(general case) A = [aij], (m x p) matrix B = [bij], (p x n) matrix (note: A has the same number of colums, p, as the number of rows of B!) C = AB C = [cij] where cij = ai1*b1j + ai2*b2j +... aip*bpj (i-row of A multiplied by j-column of B)! cij = aik bkj!!! note that, not always AB = BA!!! (matrix multiplication is not commutative) THEOREM 2.2: Let A; B; C be matrices. Then, whenever the products and sums are defined, (i) A(BC) = (AB)C (associative law) (ii) A(B + C) = AB + AC (left distributive law) (iii) (A + B)C = AC + BC (right distributive law) (iv) k(ab) = (ka)b = A(kB), k a scalar. Transpose of A A = [aij] (m x n matrix) A T = [aji] (n x m matrix) (rows <-> columns) THEOREM 2.3: Let A and B be matrices and let k be a scalar. Then, whenever the sum and product are defined, (i) (A + B) T = A T + B T (ii) (A T ) T = A (iii) (ka)t = kat (iv) (AB) T = B T A T Note that, by (iv), the transpose of a product is the product of the transposes, but in the reverse order. Square Matrices A = [aij], (n x n) Diagonal and Trace diagonal of A = a11, a22,..., ann tr(a) = trace(a) = a11 + a22 +... + ann THEOREM 2.4: Suppose A and B are n-square matrices and k is a scalar. Then (i) tr(a + B) = tr(a) + tr(b) (iii) tr(a T ) = tr(a) (ii) tr(ka) = ktr(a) (iv) tr(ab) = tr(ba)

Identity Matrix, Scalar Matrices I = [aij], aii == 1 and aij = 0, i!= j AI = IA = A ki : k-scalar matrix Powers of Matrices, Polynomials in Matrices A 2 = AA A 3 = AAA polynomal f(x) = ao + a1*x + a2*x 2 +... + an*x n polynomal of A f(a) = aoi + a1*a + a2*a 2 +... + an*a n if f(a) = 0 then we say that A is a root or zero of 'f' A = 1 2 3-4 f(x) = 2*x**2-3*x + 5 g(x) = x**2 + 3*x - 10 16-18 f(a) = -27 61 0 0 g(a) = 0 0 Invertible (Non-singular) Matrices if given A, exists B such that (square matrices) : AB = BA = I we say that A is invertible and B is its inverse, denoted A -1 example

2 5 3-5 1 0 A = B = AB = 1 3-1 2 0 1 if A and B are invertible, then AB is also invertible and we have : (AB) -1 = B -1 A -1 Inverse of a 2 x 2 matrix A a b d -b A = A -1 = 1/det(A) * c d -c a det(a) = a*d - b*c (determinant of A) if det(a) = 0 then A is not invertible Special Type of Squares Matrices Diagonal and Triangular Matrices Diagonal Matrices D = [dij] if dij == 0 for every i!= j D = [dij] = diag(d11, d22,..., dnn) Triangular (upper / lower) Matrices T = [tij] if tij == 0 for every i > j (upper triangular) T = [tij] if tij == 0 for every i < j (lower triangular) THEOREM 2.5: Suppose A = [aij] and B = [bij] are n x n (upper) triangular matrices. Then : (i) A + B, ka and AB are (upper) triangular with respective diagonals: (a11+b11, a22+b22,..., ann+bnn) (ka11, ka22,... kann) (a11*b11, a22*b22,..., ann*bnn)

(ii) For any polynomial f(x), the matrix f(a) is (upper) triangular with diagonal (f(a11), f(a22),..., f(ann)) (iii) A is invertible if and only if each diagonal element aii!= 0, and when A -1 exists it is also (upper) triangular. Symmetric and Skew-Symmetric Matrices A = [aij] (n x n) A = A T then A is symmetric or aij = aji,for every i, j A = -A T then A is skew-symmetric or aij = -aji,for every i, j (NB: the diagonal elements should all be zero!) Orthogonal Matrices A T = A -1 or AA T = A T A = I example : 1-2 1 2 A = 1/5 * A T = 1/5 * 2 1-2 1 1 8-4 1 4 8 A = 1/9 * 4-4 -7 A T = 1/9 * 8-4 1 8 1 4-4 -7 4 A A T = I THEOREM 2.6: Let A be a real matrix. Then the following are equivalent: (a) A is orthogonal. (b) The rows of A form an orthonormal set. (c) The columns of A form an orthonormal set.

THEOREM 2.7: Let A be a real 2 x 2 orthogonal matrix. Then, for some real number theta : cos(theta) sin(theta) cos(theta) sin(theta) A = or A = - sin(theta) cos(theta) sin(theta) -cos(theta) Normal Matrices A real matrix A is normal if it commutes with its transpose A T, that is : AA T = A T A If A is symmetric, orthogonal, or skew-symmetric, then A is normal. There are also other normal matrices. 1-2 1 2 A = A T = 2 1-2 1 AA T = A T A = 5I ---- Summary and Figures from : Linear Algebra (5th Ed) : 612 Solved Problems by Seymour Lipschutz, Marc Lipson Schaum's Outline ISBN-10: 0071794565