Linear Algebra Matrices Mf D 2004 Mara Asuncin
Linear Algebra & Matrices Mf. D 2004 María Asunción Fernández Seara mfseara@fil. ion. ucl. ac. uk January 21 st, 2004 “The beginnings of matrices and determinants go back to the second century BC although traces can be seen back to the fourth century BC”
Scalars, Vectors and Matrices • Scalar: variable described by a single number (magnitude) – Temperature = 20 °C – Density = 1 g. cm-3 – Image intensity (pixel value) = 2546 a. u. • Vector: variable described by magnitude and direction Column vector Row vector • Matrix: rectangular array of scalars 2 3 Square (3 x 3) Rectangular (3 x 2) d i j : ith row, jth column
Vector Operations • Transpose operator column → row • Outer product = matrix row → column
Vector Operations • Inner product = scalar • Length of a vector Right-angle triangle Pythagoras’ theorem || x || = (x 12+ x 22 )1/2 || x || = (x 12+ x 22 + x 32 )1/2 Inner product of a vector with itself = (vector length)2 x. T x =x 12+ x 22 +x 32 = (|| x ||)2 x 2 ||x|| x 1
Vector Operations • Angle between two vectors ||x|| b ||y|| q y 1 x Orthogonal vectors: x. T y = 0 = /2 y y 2
Matrix Operations • Addition (matrix of same size) – Commutative: A+B=B+A – Associative: (A+B)+C=A+(B+C)
Matrix Operations • Multiplication (number of columns in first matrix = number of rows in second) C =A (m x p) = (m x n) (n x p) 2 x 3 – – B Cij = inner product between ith row in A and jth column in B 3 x 2 Associative: (A B) C = A (B C) Distributive: A (B+C) = A B + A C Not commutative: AB BA !!! (A B)T = BT AT 2 x 2
Some Definitions … • Identity Matrix IA= AI=A • Diagonal Matrix • Symmetric Matrix B = BT bij = bji
Matrix Inverse A-1 A = I Properties A-1 only exists if A is square (n x n) If A-1 exists then A is non-singular (invertible) (A B) -1 = B-1 A-1; B-1 A B = B-1 B = I (AT) -1 = (A-1)T; (A-1)T AT = (A A-1)T = I
Matrix Determinant det (A) = ad - bc A (n x n) = [a ij ] Properties Determinants are defined only for square matrices If det(A) = 0, A is singular, A-1 does not exist If det(A) 0, A is non-singular, A-1 exists http: //mathworld. wolfram. com/Determinant. html
Matrix Inverse - Calculations A general matrix can be inverted using methods such as the Gauss-Jordan elimination, Gauss elimination or LU decomposition
Another Way of Looking at Matrices… • Matrix: linear transformation between two vector spaces Ax=y A-1 y = x A A-1 y z det(A) = 1 x 4 – 2 x 2 = 0 In this case, A is singular, A-1 does not exist x A
Other matrix definitions • Orthogonal matrix A = [q 1 | q 2 | … qj …| qn] qj. T qq = 0 (if j k) and qj. T qj = djj AT A = D • Orthonormal matrix A = [q 1 | q 2 | … qj …| qn] qj. T qq = 0 (if j k) and qj. T qj = 1 AT A = I A-1 = AT • Matrix rank: number of linearly independent columns or rows if rank of A (n x n) = n, then A is non-singular Linearly independent Linearly dependent
- Slides: 13