Lecture 1 Matrices and Determinants
Lecture 1 Matrices and Determinants
Introduction
Matrices and determinants are fundamental concepts in linear algebra, which is a branch of
mathematics that deals with the study of systems of linear equations and linear transformations
Matrix
A matrix (denoted by bolded capital letter) is a rectangular array of numbers enclosed in brackets. These
numbers are called elements of the matrix
For example
Definition of Terms
Matrix Operation
Equality of Matrices
- two matrices are equal if and only if they have the same size and corresponding elements are
equal.
[ ] [ ]
A= a b ∧B= 2 5 then if A = B, a = 2, b = 5, c = 7, and d = 3
c d 7 3
Addition
- The sum of two matrices A = [ajk] and B = [bjk] of the same size is written A + B and has entries ajk
+bjk obtained by adding the corresponding entries of A and B (can also be applied to vectors).
Matrices of different sizes cannot be added
A= [−40 6 3
1 2 ]
and B= [
5 −1 0
3 1 0 ]
, then A + B is
[
A+ B= 1 5 3
3 2 2 ]
Rules for Matrix Addition
Exercises:
[ ] [ ]
3 1 −4 2 7 −5
2. 4 3 1 and −2 1 0
1 4 −3 6 3 4
[ ] [
3 1 −4
3. 4
1
3 1 and
4 −3
−3 0
7 −4 ]
Subtraction
- If A is a matrix and B is another matrix, then (A − B) is a single matrix formed by subtracting the
elements of B from the corresponding elements of A
- A= [−40 6 3
1 2 ]
and B= [
5 −1 0
3 1 0 ]
, then A + B is
A−B=
−9 7 3
−3 0 2 [ ]
Exercises:
[ ] [ ]
2 7 −5 3 1 −4
2. −2 1 0 and 4 3 1
6 3 4 1 4 −3
[ ]
3 1 −4
3. 4
1
3 1 and
4 −3
−3 0
7 −4 [ ]
Scalar Multiplication
- The product of any m x n matrix A = [ajk] and any scalar c (number c) is written cA and is the m x
n matrix cA = [cajk] obtained by multiplying each entry of A by c
[ ] [ ] [ ]
3 1 −4 −3 −1 4 6 2 −8
- If A = 4 3 1 , then -A = −4 −3 −1 , 2A = 8 6 2
1 4 −3 −1 −4 3 2 8 −6
Exercise:
- the product C = AB (in this order) of an m x n matrix A times an r x p matrix B is defined only if
and only if r = n and is then the m x p matrix C
- When a matrix A is multiplied by another matrix B, a single matrix results in which elements are
obtained from the sum of the products of the corresponding rows of A and the corresponding
columns of B. NOTE: AB is not equal to BA
- Example
1.
2.
3.
- The transpose of an m x n matrix A is the n x m matrix AT (read A transpose) that has the first
row of A as its first column, the second row of A as its second column, and so on.
Example
1.
2.
Determinant
matrix are written between vertical lines. Thus, the determinant of [ 31 −46 ] is written as |31 −46 | and
is equal to (3 x 6) – (-4 x 1) = 22. Hence the determinant of a matrix can be expressed as a single
1. |37 −24 |
2. |−1+j3j (1−j 2j 4)|
3. |−23 −65 |
Inverse or Reciprocal of a 2 x 2 Matrix
The inverse of matrix A is A−1 such that A × A−1=I , the identity matrix or unit matrix
Let matrix A be [ ]
1 2
3 4
and let the inverse matrix A−1 be ,
a b
c d
. [ ]
Then since A × A−1=I
b+ 2d =0 →b=−2 d
−4
3 a+ 4 c=0→ a= c
3
Substituting for a and b gives
[ ][
−4
c+ 2 c −2 d+2 d
3(
3
−4
c )+ 4 c 3(−2 d)+ 4 d
=
1 0
0 1 ]
3
[ ][
2
3
c 0
0 −2 d
=
1 0
0 1 ]
2 3 −1
Showing that c=1 → c= and −2 d=1 → d=
3 2 2
−4
Since b=−2 d ,b=1 since a= → a=−2
3c
[ ]
−2 1
Thus, the inverse of matrix [ ]
1 2
3 4
is 3 −1
2 2
Exercises:
1. [−43 −17 ]
[ ]
1 2
2 3
2.
−1 −3
3 5
3. [ −1.3 7.4
2.5 −3.9 ]
Determinant of a 3 x 3 matrix
The minor of an element of a 3 by 3 matrix is the value of the 2 by 2 determinant obtained by covering
up the row and column containing that element.
[ ]
3 1 −4
A= 4 3 1
1 4 −3
The sign of a minor depends on its position within the matrix, the sign pattern being ¿. Thus the signed-
[ ]
3 1 −4
minor of element 4 in the matrix 4
1
3 1 is −
4 −3
1 −4
4 −3| |
=−( 13 )=−13. The signed-minor of an
The value of a 3 by 3 determinant is the sum of the products of the elements and their cofactors of
any row or any column of the corresponding 3 by 3 matrix.
For example:
| |
1 4 −3
1. Evaluate −5 2 6
−1 −4 2
¿1 |−42 62|−4|−5
−1 2|
6
+(−3)|
−1 −4|
−5 2
Exercises:
| |
8 −2 −10
1. Evaluate 2 −3 −2
6 3 8
| |
j2 2 j
2. Evaluate (1+ j) 1 −3
5 − j4 0
| |
3 ∠60 ° j2 1
3. Evaluate 0 (1+ j) 2∠3 0 °
0 2 j5
−1 adj A
A =
|A|
Where adj A is the adjoint of matrix A and | A| is the determinant of matrix A
[ ]
3 4 −1
Example: Determine the inverse of the matrix 2 0 7
1 −3 −2
First, we determine the cofactor of element 3 which is + |−30 −27 |=21 . The cofactor of element 4 is
−|21 −27 |=1 1 . We do this for all the elements of the matrix.
[ ]
21 11 −6
The matrix of the cofactors is 11 −5 13 .
28 −2 3 −8
[ ]
21 11 28
We get the transpose (or adj A) of this matrix which is equal to 11 −5 −2 3 and its determinant is
−6 13 −8
113.
[ ][ ] [ ]
21 11 28
3 4 −1 1 21 11 28
11 −5 −23
Therefore, the inverse of 2 0 7 is or 11 −5 −23 .
−6 13 −8 113
1 −3 −2 −6 13 −8
113
Exercises:
[ ]
4 −7 6
1. Find the inverse of −2 4 0
5 7 −4
[ ]
3 6 1/ 2
2. Find the inverse of 5 −2/3 7
−1 0 3/ 5
The procedure for solving linear simultaneous equations in using matrices is:
[ ][][]
a1 b1
a2 b2
x c
× = 1
y c2
three unknowns
[ ][][ ]
a1 b1 c1 x d1
a2 b2 c 2 × y = d 2
a3 b3 c 3 z d3
[ ]
a1 b1 c1
iii. determine the inverse matrix of
a1 b1
a2 b2[ ]
for two unknowns and a2 b2 c 2
a3 b3 c 3
iv. multiply each side of ii by the inverse matrix and
v. solve for x and y for two unknowns and x, y and z for three unknowns
Example:
3 x+ 5 y −7=0
4 x−3 y−19=0
i. we write in the form
3 x+ 5 y =7
4 x−3 y=19
ii. in matrix form
[ 3/29
4 /29 ][ ] [ xy ]=[ 197 ][ 34 /29
5 /29 3 5 ×
−3 /29 4 −3 /29 −3/29 ]
5/29
[ ] [ ] [ ][ 3/29
1 0
0 1
x
× =
y 4 /29 −3/29 ]
7
19
5/29
[ ][ ]
21 95
+
[]
x = 29 29 = 4
y 28 57
−
−1
29 29
Therefore x = 4 and y = -1.
x + y + z−4=0
2 x−3 y+ 4 z−33=0
3 x−2 y−2 z−2=0
i. we write it in the form
x + y + z=−4
2 x−3 y+ 4 z=33
3 x−2 y−2 z=2
ii. the matrix form is
[ ][][ ]
1 1 1 x 4
2 −3 4 × y = 33
3 −2 −2 z 2
[ ] [ ]
1 1 1 14 0 7
1
iii. the inverse of 2 −3 4 is 16 −5 −2
35
3 −2 −2 5 5 −5
iv. multiplying each side by the inverse gives
[ ][][ ] [ ]
1 0 0 x 4 1 14 0 7
0 1 0 × y = 33 × 16 −5 −2
35
0 0 1 z 2 5 5 −5
[][ ]
x 2
y = −3
z 5
Therefore x = 2, y = -3 and z = 5.
Exercises:
1. 3x +4y =0
2x +5y +7=0
2. x +2y +3z=5
2x −3y −z=3
−3x + 4y + 5z = 3
The procedure for solving linear simultaneous equations in using determinants is:
Where D x = | | | | | |
b1 c 1
b2 c 2
, D y=
a1
a2
c1
c2
, D=
a1 b1
a2 b2
Three unknowns
x −y z 1
= = =
Dx D y D z D
| | | | | | | |
b1 c1 d1 a1 c 1 d 1 a1 b1 d 1 a1 b1 c1
Where D x = b 2 c 2 d 2 , D y = a2 c 2 d 2 , D z = a2 b2 d 2 , D= a2 b2 c2
b3 c 3 d 3 a3 c 3 d 3 a3 b3 d 3 a3 b3 c3
Example:
3 x−4 y=12
7 x +5 y=6.5
i. write the equation in the right form
3 x−4 y−12=0
7 x +5 y−6.5=0
ii. the solution is given by
x −y 1
= =
|−4 −12
||
3 −12 3 −4
5 −6.5 7 −6.5 7 5 || |
Solving for x
x 1
=
|−4 −12
5 −6.5 7 5 ||
3 −4
|
x 1
=
86 43
x=2
In a similar way, y can be solved which is equal to -1.5.
Challenge Problem: A d.c. circuit comprises three closed loops. Applying Kirchhoff’s laws to the closed
loops gives the following equations for current flow in milliamperes:
2 I 1 +3 I 2−4 I 3=26
I 1−5 I 2−3 I 3=−87
−7 I 1+2 I 2+ 6 I 3=12
a 11 x+ a1 2 y +a 13 z=b 1
a 21 x+ a2 2 y + a2 3 z=b 2
a 31 x+ a3 2 y + a3 3 z=b3
then
Dx Dy Dz
x= , y= , z=
D D D
| | | | | | | |
a1 1 a1 2 a1 3 b 1 a12 a13 a11 b 1 a13 a11 a12 b1
where D= a2 1 a2 2 a2 3 , D x = b 2 a22 a23 , D y = a21 b 2 a 23 , D z= a21 a22 b 2
a3 1 a3 2 a3 3 b3 a32 a33 a31 b 3 a33 a31 a32 b 3
Example
x + y + z=4
2 x−3 y+ 4 z=33
3 x−2 y−2 z=2
Solution:
| |
1 1 1
D= 2 −3 4 =1 ( 6−(−8 ) )−1 ( (−4 )−12 ) + 1 ( (−4 ) −(−9 ) ) =35
3 −2 −2
| |
4 1 1
D x = 33 −3 4 =4 ( 6−(−8 ) ) −1 ( (−66 )−8 ) +1 ( (−66 )−(−6 ) )=70
2 −2 −2
| |
1 4 1
D y = 2 3 3 4 =1 ( (−66 )−8 ) −4 ( (−4 )−12 ) +1 ( 4−99 )=−105
3 2 −2
| |
1 1 4
D z= 2 −3 33 =1 ( (−6 )−(−66 ) )−1 ( 4−99 )+ 4 ( (−4 ) −(−9 ) ) =175
3 −2 2
Therefore,
Dx 70 D y −105 D z 174
x= = =2 , y = = =−3 , z= = =5
D 35 D 35 D 35