INTRODUCTION TO MATRICES
INTRODUCTION TO MATRICES
INTRODUCTION
Basic Concepts
A matrix is an array (enclosed between brackets) of real numbers arranged in m rows and n
columns. The matrix is then referred to as an m by n matrix or (m n) matrix.
[ ]
4 5
hand if B= 8 2 is a 3 by 2 matrix since it has 3 rows and 2 columns.
1 3
TYPES OF MATRICES
(a) Equal matrices
Two matrices A and B are said to be equal when
(i) The number of rows of A = the number of rows of B and
(ii) The number of columns of A = the number of columns of B and
(iii) The entries in corresponding positions are the same in both A and B.
For example in the matrices mentioned above A ≠ B since the number of rows in A are not equal
to the number of rows in B at the same time the number of columns in A are not equal to the
number of columns in B.
[ ] [ ]
2 3 2 3
However if A= 4 5 and B= 4 5 Then Matrices A and B are equivalent since entries in
1 6 1 6
Corresponding positions in both matrices are equal.
(b) Identity Matrix
A square matrix A is said to be an identity matrix when each entry on the leading diagonal of A
is unity (one) and other entries off the leading diagonal are zero. For example, the following are
identity matrices.
[ ][ ]
1 0 0
1 0
E.g. , 0 1 0 are examples of identity matrices
0 1
0 0 1
(C)Diagonal Matrix
1
A square matrix with zero entries off the leading diagonal is a diagonal matrix provided the
entries on the leading diagonal are non-zero. For example,
[ ]
2 0 0
0 5 0 . Is a diagonal matrix
0 0 9
(d) Triangular Matrix
A matrix whose entries above or below the leading diagonal are zero is referred to as a triangular
matrix. It is said to be upper triangular where all entries below the leading diagonal are zero.
It is lower triangular when all entries above the leading diagonal are zero. Following are two
triangular matrices A and B.
[ ] [ ]
1 5 3 1 0 0
If A = 0 8 4 and B= 5 8 0
0 0 7 3 4 7
A is an upper triangular matrix while B is a lower triangular matrix.
(e) The Transpose of a Matrix
A matrix B is the transpose of A if when the rows of B are turned into columns, the resulting
[ ]
3 5
matrix is the same as A . For example, if A= [
3 6 4
5 2 7 ]
then its transpose is B= 6 2 it can be
4 7
seen that the rows have turned columns and columns into rows. Then B is the transpose of A.
This is written as B= A T .
(f) Symmetric Matrix
A matrix A is said to be symmetric if A=A T . In other words, a matrix is symmetric if the matrix
and its transpose are the same.
[ ] [ ]
5 1 4 5 1 4
T
For example A= 1 2 6 A = 1 2 6 Hence A is a symmetric matrix.
4 6 3 4 6 3
(g) Skew Symmetric Matrix
A matrix A is said to be skew symmetric if AT =− A . It should be noted that this is only possible
if all the leading diagonal entries of A are zero. For example
[ ] [ ] [ ]
0 1 −4 0 −1 4 0 −1 4
T
A= −1 0 6 . Now A = 1 0 −6 and − A= 1 0 −6 since AT =− A
4 −6 0 −4 6 0 −4 6 0
2
Then A is a skew symmetricmatrix.
(h) Null Matrix
A null matrix is a matrix with all its entries equal to zero. For example
[ ]
0 0 0
0 0 0.
0 0 0
BASIC OPERATIONS ON MATRICES
(a) Multiplication of a Matrix by a Constant Let c be a constant and A a matrix. The matrix
B=cA A, is obtained from A by multiplying each entry of A by c . For example, if
A= [ 25 3 4
7 8]and c=3 then Ac=
6 9 12
15 21 24 [ ]
(b) Addition of Two Matrices
Let A and B be two matrices. The sum ( A+ B) exists only when the numbers of rows of both
matrices are the same, and the numbers of columns of both matrices are also the same. When
A+ B exists, then the sum is obtained by adding corresponding entries of A and B and putting the
[ ]
3 6 9
sum in the corresponding positions of a new matrix A+ B. For example, if A= −1 4 5
6 2 4
[ ] [ ]
3 2 −2 6 8 7
B= 6 5 3 Then A+ B= 5 9 8
4 7 2 10 9 6
(c) Difference of Two Matrices
The difference of two matrices A and B, A−B , exists when the number of rows of both matrices
are equal and the number of columns of both matrices are also equal. Then, A−B= A+(−1) B ,
where (−1)(B) is a matrix whose entries are multiplied by – 1. A+(−B) is then obtained by
addition of (−1)B to A .
[ 53
Let A=
2 1
8 7
B=
] [
6 1 3
2 7 5 ]
A−B=
[53 2
8 7]
1
+ (−1 )
[ 62 1 3
7 5
=
][+
][
5 2 1 −6 −1 −3 −1 1 −2
3 8 7 −2 −7 −5
=
1 1 2 ][ ]
Note A + B=B+ A , and B− A=−( A−B ) .
(d) Product of Two Matrices
3
Let A and B be two matrices. The condition that the product AB (in that order) exists is that the
number of columns of A must be equal to the number of rows of B. Otherwise, AB does not
exist.
When the product AB exists, then the entry in row r and column s of AB is obtained as the scalar
product of the entries in row r of A and those in the column s of B. For example, if
A=
[ a 11 a12
a 21 a22 ] [ B=
]
b11 b 12 b13
b21 b 22 b23
c c
[
c
Let AB=C= 11 12 13
c21 c22 c23 ]
Then the matrices A and B are conformable for product.
Where c 11 =a11 b 11 +a12 b21 , c 12=a 11 b12+ a12 b 22,c 13=a 11 b13+ a12 b23
c 21=a 21 b11 + a22 b 21,c 22=a 21 b12 +a22 b22,c 23=a 21 b13 +a 22 b23 .
Note: If A is an n r matrix and B is an r s matrix, then AB exists since A has r columns and B r
rows. The product AB is an n s matrix. For example, if
[ ] [ ] [ ]
6 1 4 2 4 24 58
Let A= 5 3 2 B= 8 6 C ( 3 by 2 )= A ( 3 by 3 ) X B ( 3 by 2 )= 36 52
7 0 5 1 7 19 63
DETERMINANTS
An array of numbers arranged into n rows and n columns and placed between two vertical lines
is called a determinant of order n. For example,
| || |
a1 b 1 c 1
a1 b 1
∆= ., a2 b 2 c 2 are determinants of orders 2 and 3 respectively.
a2 b 2
a3 b 3 c 3
Evaluating a 2X 2 Determinant.
| a11 a12
a21 a22 |
=a 11 a22−a12 a21 for example
5 2
4 3 | |
=( 5∗3 )−( 2∗4 )=7
[ ]
a11 a12 a13
a21 a22 a23 .
a31 a32 a33
4
Then its determinant can be obtained by reducing it into a linear combination of 2x 2
determinants using a row or a column of the determinant. Hence the determinant is obtained by;
a 11 (−1)
2
| a22 a23
a32 a33 | 3 a
| a
|
4 a a
+ a12(−1) 21 23 +a 13(−1) 21 22 .
a 31 a33 a31 a32 | |
=a 11 ( a22 a33−a 23 a32 )−a12 ( a21 a 33−a31 a23 ) +a13 ( a 21 a32−a 31 a22 )
[ ]
4 2 1
Example find the determinant of 3 1 0
5 2 4
Solution
[ ]
3 4 5
If A=¿ 2 7 6 then
1 8 9
, [ ][ ] [ ]
3 4 2 7 4 5
2 7 1 8 7 6
,
Are all sub matrices of A. Each of them is therefore a minor of A.Some particular types of
minors of a matrix A are obtained by deleting from A its r th row and the s th column. The
determinant of such a minor is denoted by Ars .
(b) Cofactor of a Matrix
The ( r, s ) cofactor of a matrix is the determinant of the matrix obtained by deleting the r th row
and the s th column of A and then multiplying the result by(−1)r +¿¿. Let C rsdenote the ( r, s )
cofactor. Then,C rs =(−1)r +¿ A rs ¿
[ ][ ]
3 4 5 a11 a12 a13
For example let A=¿ 2 7 6 = a21 a22 a23 then C 11=(−1)
1 8 9 a31 a32 a33
1 +1 7 6
8 9 | |
=( 9∗7 )−( 6∗8 )=15 ,
C 12=(−1)
1+2
|21 69|=[−1] ( 2∗9 )−( 6∗1)=−12,C =(−1) |21 78|= (2∗8) −( 7∗1)=9,
13
1+3
5
C 21=(−1)
1+2
|48 59|=[−1] ( 4∗9 )−( 5∗8)=4 C =(−1) |31 59|= (3∗9 )−( 3∗1)=24
22
2+2
C 23=(−1)
2+3
|31 48|=[−1] ( 3∗8 )−( 4∗1)=−20 , C =(−1) |47 56|=( 4∗6) −( 5∗7 )=−11,C =¿
31
1+3
32
C 33=¿
[ ]
15 −12 9
Hence the cofactor matrix is given by C=¿ 4 24 −20
−11 −8 13
(c) The Adjoint of a Matrix
The adjoint of a matrix A is the transpose of its matrix of cofactors. Let A be a matrix whose
matrix of cofactors is C.
Then Adj ( A ) =CT
[ ] [ ]
3 4 5 15 −12 9
In the last example A=¿ 2 7 6 and C= 4 24 −20
1 8 9 −11 −8 13
[ ]
15 4 −11
T
Hence Adj ( A ) =C = −12 24 −8
9 −20 13
(d) The Inverse ( A−1) of a matrix A
The inverse of a matrix A ( A−1) is a square matrix such that A A−1 =I =Identity matrix
−1 1 1
The inverse of a square matrix A = Adj ( A )= Adj ( A).
det A |A|
Exercise.
Evaluate the
i. The cofactor matrix
ii. The inverse of the matrix below;
[ ]
6 1 4
A= 5 3 2
7 0 5