Linear 1, Topic 2
Linear 1, Topic 2
MATRICES
Definitions
a11 a12 . . . a1n a11 a12 . . . a1n
a21 a22 . . . a2n a21 a22 . . . a2n
A= . or A= .
.. .. ... ..
.. .. ... ..
. .
. .
am1 am2 . . . amn am1 am2 . . . amn
" #
1 3 7
A= then a11 = 1, a12 = 3, a13 = 7, a21 = 4, a22 = 5, a23 = 6
4 5 6
2. A matrix in which each entry is Zero is called a Zero matrix denoted by 0 for
!
0 0
example; 02×2 = .
0 0
3. A matrix that has the same number of rows as the number of columns is called a
Square matrix.
1
!
4 0
the zero matrix 0n ,
0 2
!
1 1
2 2
7. A matrix A is said to be Idempotent if A2 = A. Example 1 1
2 2
8. The transpose of an m×n matrix A = [aij ] is defined as the n×m matrix B = [bji ].
The transpose of A is denoted by AT or At .
! 1 4
1 2 3
Example; If A = then AT = 2 5
4 5 6
3 6
11. Let A be an n × n matrix. Then Trace of A denoted by tr(A) is the sum of all the
diagonal elements of A that is;
2
tr(A) = a11 + a22 + . . . + ann .
Matrix Operations
Addition of Matrices
Let A = [aij ] and B = [bij ] be two m × n matrices. Then the sum A + B is defined to be
the matrix C = [cij ] with cij = aij + bij . Note that, we define the sum of two matrices
only when the order of the two matrices are same.
Multiplying a Scalar to a Matrix
Let A = [aij ] be an m × n matrix, then for any scalar k, we define kA = [kaij ].
Multiplication of Matrices
Let A = [aij ] be an m × n matrix and B = [bij ] be two n × r matrix. The product AB is
a matix C = [cij ] of order m × r with; cij = nk=1 aik bkj = ai1 b1j + ai2 b2j + . . . + ain bnj
P
. ..
.. b1j .
... ... ... ... ... .
.. ..
... ... ... ... ... b2j .
. ..
That is if Am×n = ai1
ai2 ai3 . . . ain and Bn×r
= . then;
. b3j .
. .. ..
..
...
... ... ... ...
. .
... ... ... ... ... .. ..
. bnj .
3
Determinant of matrix
Let A be a matrix, the determinant of A is denoted by det(A) or |A|. A matrix A is said
to be invertible if its determinant is non-zero.
Determinant of a 2 × 2 matrix
!
a b
Let A =
c d
a b
The determinant of A = |A| = = ad − cd
c d
Determinant of a 3 × 3 matrix
To compute the determinant of a 3 × 3 matrix, a 4 × 4 matrix and so on, the following
two methods can be used;
1. If A is a square matrix, |Mij | denote the determinant of the submatrix Mij that
remains after the ith row and the j th column are deleted from A. Alternatively, if
A = [aij ] is an n × n matrix then Mij will denote the n − 1 × n − 1 matrix obtained
from A by deleting the ith row and the j th column. The determinant of the subma-
trix Mij is called the minor of the element aij of A.
4
1 2 3
A= 3 2 1
2 0 2
Solution
2 1 3 1
A11 = (−1)1+1 = 4, A12 = (−1)1+2 = −4,
0 2 2 2
3 2 2 3
A13 = (−1)1+3 = −4, A21 = (−1)2+1 = −4,
2 0 0 2
1 3 1 2
A22 = (−1)2+2 = −4, A23 = (−1)2+3 = 4,
2 2 2 0
2 3 1 3
A31 = (−1)3+1 = −4, A32 = (−1)3+2 = 8,
2 1 3 1
1 2
A33 = (−1)3+3 = −4
3 2
2 1 −1
(b) EER: Find the cofactor matrix of the matrix B =
3 1 4
5 −3 3
3. Suppose that A = (aij ) is an n × n matrix and let Aij denote the cofactor of the
element aij with i, j = 1, 2, . . . , n. The determinant of matrix A is equal to the sum
of the products of any row or column and the corresponding cofactors. That is;
5
(i) Summing along the ith row;
|A| = ai1 Ai1 + ai2 Ai2 + . . . + ain Ain
Example
1 2 3
Compute the determinant of the matrix A =
3 2 1
2 0 2
4. The transpose of the cofactor matrix is the adjoint of the matrix A. It is usually
denoted by adj(A)
Observe that if
a11 a12 . . . a1n
a21 a22 . . . a2n
A=
.. .. . . ..
. . . .
an1 an2 . . . ann
6
A A12 . . . A1n
11
A21 A22 . . . A2n
(Aij ) = .
.. .. .. ..
. . .
An1 An2 . . . Ann
A A21 . . . An1
11
A12 A22 . . . an2
adj(A) = .
.. .. .. ..
. . .
A1n A2n . . . ann
1 2 3
Find the adjoint of the matrix A =
3 2 1
2 0 2
Combinatorial Method
Definitions
7
{1, 2, 3} . These are;
< 1, 2, 3 >, < 1, 3, 2 >, < 2, 1, 3 >, < 2, 3, 1 >, < 3, 1, 2 > and < 3, 2, 1 >
The set of n elements has n! permutations. For example a set with 4 elements has
4! = 4.3.2.1 = 24 permutations.
The set of all permutations of n elements is denoted by Sn is commonly called the
symmetric group of degree n. For example the set of all permutations for the set of
integers {1, 2, 3} is given by;
S3 = {< 1, 2, 3 >, < 1, 3, 2 >, < 2, 1, 3 >, < 2, 3, 1 >, < 3, 1, 2 >, < 3, 2, 1 >}
EER: Find all the permutations of the given set of integers
(i) {4, 7}
(i) {1, 2, 3, 4}
(iii) {1, 2, 3, 4, 5}
3. A permutation is even if the total number of inversions is an even integer and is odd
if the total number of inversions is an odd integer.
The following table classifies the various permutations of S = {1, 2, 3}.
8
4. An elementary product from a n × n matrix A is any product of n entries from A
and no two of which come from the same row or the same column.
For example consider the 3 × 3 matrix
a11 a12 a13
A = a21 a22 a23
a31 a32 a33
Matrix A has 6 elementary products (3! elementary products). These are a11 a22 a33 ,
a11 a23 a32 , a12 a21 a33 , a12 a23 a31 , a13 a21 a32 , a13 a22 a31 .
1 2 3
(a) Find the determinant of matrix A =
3 2 1
2 0 2
Solution
9
Elementary products Associated permutations Number of inversions Classification Signed elementary product
Solution
Elementary products Associated permutations Number of inversions Classification Signed elementary product
10
EER: Use the permutation method to evaluate the determinant of matrix A given
below
1 2 3
(a) A =
2 3 4
1 5 7
−1 1 2
(b) A =
3 0 −5
1 7 2
• If two rows or columns of a square matrix are identical (the same) then its determi-
nant is equal to 0.
• If A and B are square matrices of the same order then |AB| = |A||B|.
• |A − 1| = 1
|A|
; |A|¬0 and A−1 is called the inverse of A.
11
• If a matrix B is obtained from a square matrix A by adding to one row of A a scalar
times another row 0f A then |B| = |A|.
NOTE: We can use the above properties to determine the determinant of a square matrix
A as below.
Using row operations to calculate the determinant
These operations are used to reduce the given matrix to a triangular form (either upper or
lower) and then the product of the principal diagonal is obtained to give the determinant.
Examples
Use the elementary row operations to find the determinant of the following matrices
2 1 3 1
1 0 1 1
1. A =
0 2 1 0
0 1 2 3
Solution
By interchanging rows
2 1 3 1 1 0 1 1
1 0 1 1 2 1 3 1
=−
0 2 1 0 0 2 1 0
0 1 2 3 0 1 2 3
R2 − 2R1 → R2
12
1 0 1 1
0 1 1 −1
−
0 2 1 0
0 1 2 3
R3 − 2R2 → R3 , R4 − R2 → R4
1 0 1 1
0 1 1 −1
−
0 0 −1 2
0 0 1 4
R4 + R3 → R4
1 0 1 1
0 1 1 −1
−
0 0 −1 2
0 0 0 6
|A| = −(1)(1)(−1)(6) = 6
2 4 −2 6
1 2 5 4
2. A =
1 1 2 4
0 2 −6 3
Solution
2 4 −2 6 1 2 −1 3
1 2 5 4 1 2 5 4
=2
1 1 2 4 1 1 2 4
0 2 −6 3 0 2 −6 3
R2 − R1 → R2 , R3 − R1 → R3
13
1 2 −1 3 1 2 −1 3
0 0 6 1 0 −1 3 1
2 = −2
0 −1 3 1 0 0 6 1
0 2 −6 3 0 2 −6 3
R4 + 2R1 → R4
1 2 −1 3
0 −1 3 1
−2
0 0 6 1
0 0 0 5
|A| = −2(1)(−1)(6)(5) = 60
2. Adjoint method
3. Direct method
3. If the row reduced form of A has zero element along the main diagonal, stop (it
implies that A has no inverse). Otherwise continue.
4. Use the elementary row operations on the augmented matrix to transform the left
partition to an n × n identity matrix.
14
5. The right partition of the final augmented matrix is the inverse of A.
Examples
Solution
" # " # " # " #
1 2 1 0 1 2 1 0 1 2 1 0 1 0 −2 1
[A|1] = ∼ ∼ 3
∼
3 4 0 1 0 −2 −3 1 0 1 2
− 21 0 1 3
2
− 12
" #
−2 1
A−1 = 3
2
− 12
Solution
0 1 1 1 0 0 1 1 1 0 1 0 1 1 1 0 1 0
[A|1] =
1 1 1 ∼ 0 1 1
0 1 0 ∼ 0 1 1
1 0 0 1 0 0
1 1 3 0 0 1 1 1 3 0 0 1 0 0 2 0 −1 1
1 1 1 0 1 0 1 0 0 −1 1 0 1 0 0 −1 1 0
1
∼
0 1 1 1 0 ∼ 0 1 1
0 1 0 ∼ 0 1 0
0 1 2
− 21
0 0 1 0 − 21 1
2
0 0 1 0 − 12 1
2
0 0 1 0 − 12 1
2
15
−1 1 0
−1
A = 1 1 1
2
− 2
1 1
0 −2 2
1 −1 2
EER: Show that matrix A =
3 −3 1 has no inverse.
3 −3 1
Theorem 2. Let A be a square matrix and I the identity matrix of the same order as A.
Then adj(A)A = |A|I.
6 0 then A−1 =
Corollary 1. If A is a square matrix and |A| = 1
|A|
adj(A).
1 1 −1
EER: Find the inverse of matrix A =
0 0 using the adjoint method.
1
2 1 2
16