Matrix Review
Matrix Review
(Matrix Algebra)
What is a matrix?
A rectangular array of numbers (we will concentrate on
real numbers). A nxm matrix has ‘n’ rows and ‘m’
columns
M11 M12 M13 M14 First row
M3x4 M21 M22 M23 M24 Second row
M31 M32 M33 M34 Third row
a1 a2 a3 a4
A column vector of length ‘m’ is a mx1 matrix
a1
a
2
a 3
Special matrices
0 0 0 0
03x 4
0 0 0 0
0 0 0 0
Identity matrix: A square matrix which has ‘1’ s on the
diagonal and zeros everywhere else.
1 0 0
I3x 3
0 1 0
0 0 1
Matrix operations
Equality of matrices
1 2 4 a b c
A 3 0 7
B d e f
9 1 5 g h i
a 1, b 2, c 4,
A B d 3, e 0, f 7,
g 9, h 1, i 5.
Matrix operations Addition of two
matrices
1 2 4
A 3
0 7 c 3
9 1 5
3 6 12
cA 9 0 21
27 3 15
Multiplication by a
scalar
Matrix operations
Special case
1 2 4
A 3 0 7 c 1
9 1 5
1 2 4
cA -A 3 0 7
9 1 5
Matrix operations Subtraction
1 2 4 1 3 10
A 3 0 7 B 3 1 0
9 1 5 1 0 6
2 1 6
C A B 0 1 7
8 1 1
Note that A - A 0 and 0 - A -A
Transpose
Special
operations
If A is a mxn matrix, then the transpose of A is
the nxm matrix whose first column is the first
row of A, whose second column is the second
column of A and so on.
1 2 4 1 3 9
A 3 0 7 A 2 0 1
T
9 1 5 4 7 5
Transpose
Special
operations
AA T
Matrix operations Scalar (dot) product of
two vectors
If a and b are two vectors of the same size
a1 b1
a a 2 ; b b
2
a3 b3
The scalar (dot) product of a and b is a scalar
obtained by adding the products of
corresponding entries of the two vectors
a b a1b1 a 2 b 2 a 3 b3
T
Matrix operations Matrix multiplication
A B = AB
mxr rxn mxn
inside
outside
Matrix operations Matrix multiplication
A B BA I
Then
(a)The matrix A is called invertible, and
(b) the matrix B is the inverse of A and is
denoted as A-1.
AB BA I
AC CA I
(BA)C IC C
B(AC) BI B
BC
Hence a matrix cannot have two or more
inverses.
Some properties
Inverse of a
matrix
1 -1
k A 1
A
k
Inverse of a Properties
matrix
Property 3: If A and B are invertible square
matrices then
1
A B
1 -1
B A
(AB) AB
1
I
-1
Premultiplying both sides by A
A-1(AB) AB A 1
1
A ABAB
-1 1
A 1
BAB A 1
1
-1
Premultiplying both sides by B
AB 1 1
B A 1
What is a determinant?
The determinant of a square matrix is a number
obtained in a specific manner from the matrix.
a11 a12
A ; det( A) a11a 22 a12a 21
a 21 a 22
1 3
det( A ) 1 7 3 5 8
5 7
2 4 - 3 2 4 3 2 4
A 1 0 4
1 0 4 1 0
2 - 1 2
2 1 2 2 1
0 -8 8 0 32 3
2 7 8
3 2 4 0
2 7 8
a 21 a 23 a 21 a 23
M12 a 21a 33 a 23a 31 C12 M12
a 31 a 33 a 31 a 33
What is a cofactor?
Sign of cofactor -
- -
-
Find the minor and cofactor of a33
2 4 - 3
A 1 0 4
Minor 2 4
2 - 1 2 M 33 2 0 4 1 4
1 0
4 0 1 3 0 1 3 4 1
det(A)=(1) 5 2 -2 - (0) -1 2 -2 +2 -1 5 -2
1 1 3 0 1 3 0 1 3
3 4 0
- (-3) -1 5 2 = (1)(35)-0+(2)(62)-(-3)(13)=198
0 1 1
Example : evaluate
1 5 -3
det(A)= 1 0 2
3 -1 2
By a cofactor along the third column
det(A)=a13C13 +a23C23+a33C33
1 0 1 5 1 5
det(A)= -3* (-1)4 +2*(-1)5 +2*(-1)6
3 -1 3 -1 1 0
= det(A)= -3(-1-0)+2(-1)5(-1-15)+2(0-5)=25
Quadratic form
d1 k11 k12
Let d k
Symmetric
d 2 k 21 k 22 matrix
Then
k11 k12 d1
U d k d d1 d 2
T
k12 k 22 d 2
k11d1 k12 d 2
d1 d 2
k12 d1 k 22 d 2
d1 (k11d1 k12 d 2 ) d 2 (k12 d1 k 22 d 2 )
2 2
k11d1 2k12 d1 d 2 k 22 d 2
Differentiation of quadratic form
Differentiate U wrt d1
U
2k11d 1 2k12 d 2
d1
Differentiate U wrt d2
U
2k12 d 1 2k 22 d 2
d 2
Differentiation of quadratic form
Hence
U
U d1 k11 k12 d1
2
d U k12 k 22 d 2
d 2
2k d