Sheet 3
Sheet 3
Introduction: J.J. Sylvester was the first man who introduced the word matrix in 1850 and later
on in 1958 Arthur Cayley developed the theory of matrices in a symmetric way. Matrix has
wide applications in Science and Engineering.
Column Matrix: A matrix with only one column is called a column matrix.
1
[3]
5 (3×1)
Row Matrix: A matrix with only one row is called a row matrix.
[3 2 5](1×3)
Addition of matrices is defined only for the matrices having same number of rows and the same
number of columns.
1 −2 2 7 3 5
For example if 𝐴 = [ ] and 𝐵 = [ ] then 𝐴 + 𝐵 = [ ]
3 5 −5 4 −2 9
The product of the matrix 𝐴 by a scalar 𝑘, written 𝑘. 𝐴 is the matrix obtained by multiplying each
element of 𝐴 by 𝑘.
1 −2 3 2 −4 6
For example if 𝐴 = [ ] then 2𝐴 = [ ]
0 4 5 0 8 10
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 1
Matrix Multiplication:
Two matrices 𝐴 and 𝐵 are conformable for multiplication if the number of columns in 𝐴 is equal
to the number of rows in 𝐵.
Symbolically, let 𝐴 = [𝑎𝑖𝑗 ] be the 𝑚 × 𝑝 matrix and 𝐵 = [𝑏𝑖𝑗 ] be the 𝑝 × 𝑛 matrix. Then 𝐴𝐵 is
the 𝑚 × 𝑛 matrix 𝐶 = [𝑐𝑖𝑗 ] where
𝑝
𝑖 = 1,2, … … , 𝑚
{
𝑗 = 1,2, … … , 𝑛
1 3 2 0 −4
Example: If 𝐴 = [ ] and 𝐵 = [ ]
2 −1 5 −2 6
17 −6 14
Then 𝐴𝐵 = [ ]
−1 2 −14
Transpose of a Matrix:
The transpose of a matrix 𝐴, written 𝐴𝑇 , is the matrix obtained by writing its rows as columns
and its columns as rows.
1 4
1 2 3𝑇
Example: [ ] = [2 5]
4 5 6
3 6
Square Matrix: A matrix with the same number of rows and columns is called a square matrix.
1 2 3
[3 2 1]
5 3 4
Diagonal Matrix: A square matrix whose elements 𝑎𝑖𝑗 = 0 when 𝑖 ≠ 𝑗 is called a diagonal
matrix.
4 0 0
Example: [0 2 0] is a diagonal matrix.
0 0 1
Identity Matrix: A square matrix whose elements 𝑎𝑖𝑗 = 0 if 𝑖 ≠ 𝑗 and 𝑎𝑖𝑗 = 1 if 𝑖 = 𝑗 is called
the identity or unit matrix.
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 2
1 0 0
Example: [0 1 0] is a 3× 3 identity matrix.
0 0 1
Zero Matrix or null matrix: A matrix in which every element is zero is called a null matrix or a
zero matrix.
0 0 0 0
Example: [0 0 0 0] is a 3 × 4 zero matrix.
0 0 0 0
Symmetric Matrix: A square matrix 𝐴 is symmetric if 𝐴𝑇 = 𝐴.
1 3 7
Example: [3 4 5]
7 5 6
Skew-symmetric Matrix: A square matrix 𝐴 is skew-symmetric if 𝐴𝑇 = −𝐴.
0 1 −3
Example: [−1 0 5]
3 −5 0
3 1 − 2𝑖 4 + 7𝑖
Example: [1 + 2𝑖 −4 −2𝑖 ]
4 − 7𝑖 2𝑖 5
Note that the diagonal elements of Hermitian matrices must be real numbers.
𝑖 1−𝑖 2
Example: [−1 − 𝑖 3𝑖 𝑖]
−2 𝑖 0
Trace of a Matrix: If 𝐴 is a square matrix, then the trace of 𝐴, denoted by tr(𝐴), is defined to be
the sum of the entries on the main diagonal of 𝐴. The trace of 𝐴 is undefined if 𝐴 is not a square
matrix.
5 −8 4
Example: 𝐴 = [ 2 7 −3] then tr(𝐴)= 5 + 7 + 0 = 12
−2 1 0
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 3
Inverse of a Matrix: If 𝐴 is a square matrix, and if a matrix 𝐵 of the same size can be found
such that 𝐴𝐵 = 𝐵𝐴 = 𝐼, then 𝐴 is said to be invertible and 𝐵 is called an inverse of 𝐴. If no such
matrix 𝐵 can be found, then 𝐴 is said to be singular.
3 5 2 −5
The matrix 𝐵 = [ ] is an inverse of 𝐴 = [ ]
1 2 −1 3
2 −5 3 5 1 0
since 𝐴𝐵 = [ ][ ] =[ ]=𝐼
−1 3 1 2 0 1
3 5 2 −5 1 0
and 𝐵𝐴 = [ ][ ]=[ ]=𝐼
1 2 −1 3 0 1
A Matrix with no Inverse
1 4 0
The matrix 𝐴 = [2 5 0] is singular. To see why, let
3 6 0
𝑏11 𝑏12 𝑏13
𝐵 = [𝑏21 𝑏22 𝑏23 ]
𝑏31 𝑏32 𝑏33
Theorem
𝑎 𝑏
The matrix 𝐴 = [ ] is invertible if 𝑎𝑑 − 𝑏𝑐 ≠ 0, in which case the inverse is given by the
𝑐 𝑑
formula
1 𝑑 −𝑏
𝐴−1 = [ ]
𝑎𝑑 − 𝑏𝑐 −𝑐 𝑎
1 2
Example: Consider the matrix 𝐴 = [ ] then
1 3
1 3 −2 3 −2
𝐴−1 = [ ]=[ ]
1 −1 1 −1 1
Row operations of Matrix:
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 4
2. Adding a multiple of one row to another,
1 0
Example: [ ] (Multiply the second row of 𝐼2 by −3).
0 −3
1 0 3
[0 1 0] (Add 3 times the third row of 𝐼3 to the first row)
0 0 1
Using Row Operations to find Inverse of a Matrix:
1 2 3
𝐴 = [2 5 3]
1 0 8
Solution: We want to reduce 𝐴 to the identity matrix by row operations and simultaneously
apply these operations to 𝐼 to produce 𝐴−1 . To accomplish this we shall adjoin the identity
matrix to the right side of 𝐴, thereby producing a matrix of the form:
[𝐴|𝐼]
Then we shall apply row operations so that the final matrix will have the form:
[𝐼|𝐴−1 ]
1 2 3 1 0 0
[𝐴|𝐼] = [2 5 3| 0 1 0]
1 0 8 0 0 1
1 2 3 1 0 0
= [0 1 −3 | −2 1 0]
0 −2 5 −1 0 1
[𝑅2 → 𝑅2 − 2𝑅1 , 𝑅3 → 𝑅3 − 𝑅1 ]
1 2 3 1 0 0
= [0 1 −3 | −2 1 0]
0 0 −1 −5 2 1
[𝑅3 → 2𝑅2 + 𝑅3 ]
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 5
1 2 3 1 0 0
= [0 1 −3 | −2 1 0 ]
0 0 1 5 −2 −1
[𝑅3 → −𝑅3 ]
1 2 0 −14 6 3
= [0 1 0 | 13 −5 −3 ]
0 0 1 5 −2 −1
[𝑅1 → 𝑅1 − 3𝑅3 , 𝑅2 → 3𝑅3 + 𝑅2 ]
1 0 0 −40 16 9
= [0 1 0 | 13 −5 −3 ]
0 0 1 5 −2 −1
[𝑅1 → 𝑅1 − 2𝑅2 ]
= [𝐼|𝐴−1 ]
Thus,
−40 16 9
−1
𝐴 = [ 13 −5 −3 ]
5 −2 −1
Example 02: Find the inverse of
1 6 4
𝐴 = [ 2 4 −1]
−1 2 5
Solution:
1 6 4 1 0 0
[𝐴|𝐼] = [ 2 4 −1| 0 1 0]
−1 2 5 0 0 1
1 6 4 1 0 0
=[ 0 −8 −9| −2 1 0]
0 8 9 1 0 1
[𝑅2 → 𝑅2 − 2𝑅1 , 𝑅3 → 𝑅3 + 𝑅1 ]
1 6 4 1 0 0
= [ 0 −8 −9| −2 1 0]
0 0 0 −1 1 1
[𝑅3 → 𝑅2 + 𝑅3 ]
Since we have obtained a row of zeros on the left side, 𝐴 is not invertible.
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 6
Exercise Problems:
1. Find the inverse of the following matrix by using row canonical form:
3 11 6
3 4 −1 − 10 − 5
2
𝐴 = [1 0 3] Answer: 𝐴−1 = [−1 1 1]
1 7 2
2 5 −4 −2 10 5
1 1 1
−2
2 −1 −1 2 2
−1 1 5 1
𝐴 = [1 −2 1] Answer: 𝐴 = −6
6 2
1 −1 2 1 1 1
[− 6 − 6 2]
A square matrix 𝐷 = (𝑑𝑖𝑗 ) of order 𝑚 is said to be non-singular if and only if |𝐷| ≠ 0 otherwise
it is said to be singular.
1 0 |𝐷| 1 0
Example03: 𝐷 = ( ), =| | = 0 i.e. 𝐷 is singular.
1 0 1 0
1 −2 |𝐷| 1 −2
𝐷=( ), =| | = 2 i.e. 𝐷 is non-singular.
1 0 1 0
Minors and Cofactors:
If 𝐴 is a square matrix, then the minor of entry 𝒂𝒊𝒋 is denoted by 𝑀𝑖𝑗 and is defined to be the
determinant of the sub-matrix that remains after the 𝑖th row and 𝑗th column are deleted from 𝐴.
The number (−1)𝑖+𝑗 𝑀𝑖𝑗 is denoted by 𝐶𝑖𝑗 and is called the cofactor of entry 𝒂𝒊𝒋 .
3 1 −4 3 1 −4
5 6
Example04: Let 𝐴 = [2 5 6 ]. The minor of entry 𝑎11 is 𝑀11 = |2 5 6 |=| |=
4 8
1 4 8 1 4 8
16.
3 1 −4
3 −4
Similarly, the minor of entry 𝑎32 is 𝑀32 = |2 5 6 |=| | = 26.
2 6
1 4 8
The cofactor of 𝑎32 is 𝐶32 = (−1)3+2 𝑀32 = −𝑀32 = −26.
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 7
Adjoint of a Matrix:
If 𝐴 is any 𝑛 × 𝑛 matrix and 𝐶𝑖𝑗 is the cofactor of 𝑎𝑖𝑗 , then the matrix
is called the matrix of cofactors from A. The transpose of this matrix is called the adjoint of 𝑨
and is denoted by 𝑎𝑑𝑗(𝐴).
1
𝐴−1 = 𝑎𝑑𝑗(𝐴)
det(𝐴)
Example 05: Find the Inverse of the following Matrix using Adjoint.
3 2 −1
𝐴 = [1 6 3]
2 −4 0
3 2 −1
Solution: det(𝐴) = |1 6 3 | = 3(0 + 12) − 2(0 − 6) − 1(−4 − 12)
2 −4 0
= 36 + 12 + 16 = 64
12 6 −16
[4 2 16 ]
12 −10 16
12 4 12
and the adjoint of 𝐴 is 𝑎𝑑𝑗(𝐴) = [ 6 2 −10]
−16 16 16
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 8
12 4 12
64 64 64
1 1 12 4 12 6 2 −10
𝐴−1 = 𝑎𝑑𝑗(𝐴) = [ 6 2 −10] =
det(𝐴) 64 64 64 64
−16 16 16
−16 16 16
[ 64 64 64 ]
Theorem: If 𝐴 is an 𝑛 × 𝑛 triangular matrix (upper triangular, lower triangular, or diagonal),
then det(𝐴) is the product of the entries on the main diagonal of the matrix; that is,
det(𝐴) = 𝑎11 𝑎12 … … … 𝑎𝑛𝑛 .
2 7 −3 8 3
0 −3 7 5 1
||0 0 6 7 6 || = (2)(−3)(6)(9)(4) = −1296
0 0 0 9 8
0 0 0 0 4
Cramer’s Rule:
𝑥1 + +2𝑥3 = 6
−3𝑥1 + 4𝑥2 + 6𝑥3 = 30
−𝑥1 − 2𝑥2 + 3𝑥3 = 8
Solution:
1 0 2 6 0 2 1 6 2 1 0 6
𝐴 = [−3 4 6] , 𝐴1 = [30 4 6] , 𝐴2 = [−3 30 6] , 𝐴3 = [−3 4 30]
−1 −2 3 8 −2 3 −1 8 3 −1 −2 8
Therefore,
det(𝐴3 ) 152 38
𝑥3 = = = ∙
det(𝐴) 44 11
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 9
Exercise Problems:
2 5 5 3 −5 −5
(i) 𝐴 = [−1 −1 0] Answer: 𝐴−1 = [−3 4 5]
2 4 3 2 −2 −3
1 3
1
2 −3 5 2 2
3
(ii) 𝐴 = [0 1 −3] Answer: 𝐴−1 = 0 1 2
0 0 2 1
[0 0 2]
𝑥 − 4𝑦 + 𝑧 = 6
144 61 46
(i) 4𝑥 − 𝑦 + 2𝑧 = −1 Answer: 𝑥 = − 55 , 𝑦 = − 55 , 𝑧 = 11
2𝑥 + 2𝑦 − 3𝑧 = −20
3𝑥1 − 𝑥2 + 𝑥3 = 4
(ii) −𝑥1 + 7𝑥2 − 2𝑥3 = 1 Answer: Cramer’s rule does not apply.
2𝑥1 + 6𝑥2 − 𝑥3 = 5
Matrix Algebra and Determinants (MAT205), Ahsan Ali, Senior Lecturer, Dept of ECE, EWU. Page 10