Matrices and Determinants Topic 3: Aa A Aa A A A Aa A
Matrices and Determinants Topic 3: Aa A Aa A A A Aa A
• Operations on Matrices:
o Addition of Matrices: To add two matrices, they must have the same order. To add,
we simply add corresponding entries.
o Example:
�5 -3� � -2 1 � �5 + (-2) -3 + 1 � �3 -2 �
� � � � �
-3 4 �+ �3 0 �= �-3 + 3 4+0 � � 4�
� �= �0 �
�
�0 7 ��� �4 -3� �0 + 4
� � 7 + (-3) �
� ��4 4� �
o Subtraction of Matrices: To subtract two matrices, they must have the same order.
We simply subtract corresponding entries.
o Example:
9 -2 4 4 0 7 9-4 -2-0 4-7
5 0 6 - 1 5 - 4 = 5 - 1 0-5 6 - (-4)
1 3 8 - 2 3 2 1 - ( -2) 3-3 8 - 2
5 -2 - 3
= 4 - 5 10
3 0 6
o Example:
2 3�
�
� 111�
�
11�
A= � and B = �
� 1 0 2�
� �
� �
1 0�
�
(2)(1) + (3)(1) = 5 (2)(1) + (3)(0) = 2 (2)(1) + (3)(2) = 8� �
� 5 2 8�
� � � �
C = AB = �
(1)(1) + (1)(1) = 2 (1)(1) + (1)(0) = 1 (1)(1) + (1)(2) = 3 �= �2 1 3�
(1)(1) + (0)(1) = 1 (1)(1) + (0)(0) = 1 (1)(1) + (0)(2) = 1 �
� �� �
1 1 1��
�
• Definition: A Square matrix with ones on the diagonal and zeros elsewhere is called an
identity matrix. It is denoted by I.
• Definition: Given a square matrix B, if there exists a matrix D such that BD = DB = I, then D
is called the inverse of B, and is denoted by D = B-1.
n
• Given a system of equations �a x = b
j =1
ij j i , it can be written as a matrix equation Ax = b ,
where A is the matrix of the coefficients, is the column matrix of the variables and is the
column matrix of the constants. i.e.
If A-1 exists then the system has a unique solution given by x = A-1 b
A matrix is in reduced echelon form if in addition to the above three properties it also has
the following property:
o Every other entry in a column containing a leading one is zero
We have seen that any system of equations can be written as a matrix system. i.e. the
two systems are equivalent.
So, given a system Ax = b we can form the augmented matrix (Ab) by attaching an
additional column at the end of the matrix A with entries from matrix b. Since the
original system of equations remains unchanged as described above, the system
described by the augmented matrix (Ab) also remains unchanged under the following
row operations:
Using row operations, we will change the matrix (Ab) to an Echelon form or a
reduced Echelon form. Once that is achieved, the solution will be easily found.
�1 2 1 1 �R - 2 R 1 2 1 1 �R �
� 1 2 1 1�
�
( Ab) = �2 2 0 2�
2 1
� �
0 -2 -2 0 �~ �
23
� -1 1 -2 �
~
�R -3 R � 0 �
�
�3 5 4 1 �
�
3 1
0 -1 1 -2 �
�
� � � 0
� -2 -2 0 �
�
- R2
1 2 1 1 �R - 2 R �
� 1 0 3 -3�- R /4 �
1 0 3 -3�
� �1 2
� � 3
� -1 2 �
~ �0 1 -1 2 �R3~+2 R2 �0 1 -1 2 �~ � 0 1 �
0 -2 -2 0 �
�
� � �
�0 0 -4 4 �
� �
0 0
� 1 -1��
R1 - 3 R3
1 0 0 0�
�
�
0 1 0 1�
~
R2 + R3
� �
�
0
� 0 1 -1�
�
This gives the solution: x = 0, y = 1, z = -1
o Solving Equations using Inverse: If we could find A-1, we could also solve the system
-1
by using x = A b. One way to find inverse is as follows:
o Theorem: Given a nxn matrix A, if the augmented matrix (AI), where I is the nxn
identity matrix, can be row reduced to a matrix (IB), then B is the inverse of A. If (AI)
cannot be reduced to (IB), then A does not have an inverse.
So, 3
� 3 -1�
�2 �
A-1 = �-1 -2 1 �
� �
�-2 -5 2 �
� �
This gives the solution
�3 3 -1� �3 + 3 + 1� � 11 �
�x � � 2 �
� 1 � � 2 � � 2�
� � -1 � �� �
x = �y �= A b = -1 -2 1 �1 �= -1 - 2 - 1 = -4 �
� � �
�z � � �
� � �� �
�� �-2 -5 2 �
�-1��� -2 - 5 - 2 � �-9 �
� � � �� �
• Definition: Let M be the set of all square matrices. Then the Determinant is a function from M to
the set of real numbers. i.e. the determinant is a process of attaching a real number to every
square matrix.
• Example: det =
• Second Order Determinant: A 2 x 2 determinant can be found using the following method:
a11 a12
= a11a22 - a21a22
a21 a22
-1 2
• Example: = (-1)(-4) - (-3)(2) = 4 + 6 = 10
-3 -4
a11 a12
The Minor of a23 =
a31 a32
a11 a13
The Minor of a32 =
a21 a23
i+ j
Definition: The Cofactor of aij = (-1) (Minor of a )
• ij
2+3
a11 a12 a11 a12
The Cofactor of a23 = C23 = (-1) =-
a31 a32 a31 a32
1+1
a22 a23 a a23
The Cofactor of a11 = C11 = (-1) = 22
a32 a33 a32 a33
Theorem: The value of a determinant of order 3 is the sum of three products obtained by
•
multiplying each element of any one row (or each element of any one column) by its cofactors.
Note: The above theorem and definitions of minor and cofactor generalize completely for
•
determinants of order higher than 3
2 -2 0
Example: Evaluate -3 1 2
•
1 -3 -1
2 -2 0
-3 1 2 =
1 -3 -1
� 1+1 1 2 � � 1+ 2 -3 2 � � 1+1 -3 1 �
2� (-1) �+ (-2) � (-1) �+ (0) � (-1) �=
� -3 -1 � � 1 -1 � � 1 -3 �
(2)(1)[(1)(-1) - (-3)(2)] + (-2)(-1)[(-3)(-1) - (1)(2)] + 0 =
(2)(5) + (2)(1) = 12
�8 -1 3 � �8 0 10 �
Example: The transpose of A = �0 0 2� A =�
�is T
-1 0 4�
• � � �
�
10
� 4 -3�� �
�3 2 -3 �
�
Definition: Given a matrix A, calculate all the cofactors of A. We then form the matrix (C ) of
ij
•
the cofactors. The Adjoint or Adjugate of A is the transpose of the matrix of the cofactors. i.e.
adj ( A) = (Cij )T = (C ji )
The inverse of A is then found by the formula: A-1 = 1 adj ( A)
• | A|
Example: Find the inverse of the following matrix using determinant.
•
�-2 1 3�
A= �0 -1 1 �
�
�
�
�1 2 0 �
�
Solution: We need to first find all the cofactors.
-1 1 0 1 0 -1
C11 = ( -1)1+1 = -2 C12 = ( -1)1+ 2 =1 C13 = (-1)1+3 =1
2 0 1 0 1 2
1 3 -2 3 -2 1
C21 = (-1) 2+1 =6 C22 = (-1) 2+ 2 = -3 C23 = (-1) 2+3 =5
2 0 1 0 1 2
1 3 -2 3 -2 1
C31 = ( -1)3+1 =4 C32 = (-1)3+ 2 =2 C33 = (-1)3+3 =2
-1 1 0 1 0 -1
T
�C11 C12 C13 � � C11 C21 C31 � � -2 6 4�
�
Now, adj ( A) = C21 C22 � �
C23 � = �
C12 C22 � �
C32 �= �1 -3 2�
� �. And
�
�C31 C32 C33 �
� � C13
� C23 C33 �
� ��1 5 2�
�
-2 1 3
-1 1 0 1 0 -1
det( A) = 0 -1 1 = -2 -1 +3 = -2(-2) - 1(-1) + 3(1) = 8
2 0 1 0 1 2
1 2 0
�-2 6 4 �
-11 1� �
Therefore, A = adj ( A) = �1 -3 2 �
det( A) 8
�
�1 5 2 �
�
Cramer’s Rule for Solving Systems of Equations: Suppose we are given a system of 2 equations
•
in 2 unknowns as follows:
a11 x1 + a12 x2 = b1
a21 x1 + a22 x2 = b2
D1 D b1 a12
Then, the solution is given by: x1 = and x2 = 2 , where D = det( A) , D1 = and
D D b2 a22
a11 b1
D2 =
a21 b2
x1 + 2 x2 + x3 = 1
2 x1 + 2 x2 = 2
3x1 + 5 x2 + 4 x3 = 1
Solution:
1 2 1 1 2 1
2 0 2 0 2 2 2 0 2 0 2 2
D = 2 2 0 =1 -2 +1 D1 = 2 2 0 = 1 -2 +1
5 4 3 4 3 5 , 5 4 1 4 1 5
3 5 4 1 5 4
= 1(8) - 2(8) + 1(4) = 8 - 16 + 4 = -4 = 1(8) - 2(8) + 1(8) = 8 - 16 + 8 = 0
1 1 1
2 0 2 0 2 2
D2 = 2 2 0 = 1 -1 +1
, 1 4 3 4 3 1 , and
3 1 4
= 1(8) - 1(8) + 1( -4) = 8 - 8 - 4 = -4
1 2 1
2 2 2 2 2 2
D3 = 2 2 2 = 1 -2 +1
5 1 3 1 3 5
3 5 1
= 1(-8) - 2(-4) + 1(4) = -8 + 8 + 4 = 4
D 0 D -4 D 4
So, by Cramer’s Rule: x1 = 1 = = 0 , x2 = 2 = = 1 , x3 = 3 = = -1 .
D -4 D -4 D -4