Lesson 14: Inverse of Square Matrices, Solutions of System of linear Equations and Applications
Lesson Objective
Dear learner,
by the end of this lesson, you will be able to:
- Determine inverse of a square matrix
- Find solution of system of linear equations using CRAMMER’S rule
- Test collinearity of points using the concept of determinants
Key Terms
Inverse of a matrix
Crammer’s rule
Brainstorming Activity
Dear learner welcome to lesson 3, read the following question and give your answer. Let $A = \begin{pmatrix} 2 & 3 \\ 1 & 2 \end{pmatrix}$ then,
a). find $A^{-1}$
b). find $det(A)$ and $det(A^{-1})$
c). compare $det(A)$ and $det(A^{-1})$
Solution:
a). you can find $A^{-1}$ by applying thefollowing:
$\implies$ $ det(A) = 1$, and $adjoint of A = (C_{ij})^{T} = \begin{pmatrix}2& -3 \\ -1 & 2 \end{pmatrix}$
$\implies$ $ A^{-1} = \frac{adj(A)}{det(A)} = \begin{pmatrix} 2 & -3 \\ -1 & 2 \end{pmatrix}$
b).$ det(A) = 1$ and $det(A^{-1}) = 1$
C). $det(A) = det(A^{-1} = 1$
3.1 Inverse of a matrix
Definition:
A square matrix A is invertible if and only if A is non- singular.
$A^{-1} = \frac{Adj(A)}{|A|}$
Example 1:
Find the inverse if it exists of the matrix:
a). A = $\begin{pmatrix}1&3\\2&-1\end{pmatrix}$
b). B = $\begin{pmatrix}0&-2&-3\\1&3&3\\-1&-2&-2\end{pmatrix}$
Solution:
a) Let A = $\begin{pmatrix}1&3\\2&-1\end{pmatrix}$ and the cofactors of A are:
$C_{11} = -1$,
$C_{12} = -2$
$C_{21} = -3$ and
$C_{22} = 1$
then $C_{ij} = \begin{pmatrix}-1&-2\\-3&1\end{pmatrix}$
implies $Adj(A) =\begin{pmatrix}-1&-2\\-3&1\end{pmatrix}^{t}$ = $\begin{pmatrix}-1&-3\\-2&1\end{pmatrix}$
and |A| = -7, then $A^{-1} = \frac{Adj(A)}{|A|} = \frac{\begin{pmatrix}-1&-3\\-2&1\end{pmatrix}}{-7} = \begin{pmatrix} 1/7 & 3/7 \\2/7 & -1/7 \end{pmatrix}$
b). B = $\begin{pmatrix}0&-2&-3\\1&3&3\\-1&-2&-2\end{pmatrix}$
cofactors of B: $C_{11} = 0$, $C_{12} = -1$, $C_{13} = 1$
$C_{21} = 2$, $C_{22} = 3$, $C_{23} = 2$,
$C_{31} = 3$, $C_{32} = -3$, $C_{33} = 2$
then Adj(A) = $\begin{pmatrix}0&2&3\\-1&3&-3\\1&2&2\end{pmatrix}$
and |A| = -1 , implies $A^{-1}$ = $\frac{Adj(A)}{|A|} = \frac{\begin{pmatrix}0&2&3\\-1&3&-3\\1&2&2\end{pmatrix}}{-1}$ = $\begin{pmatrix}0&-2&-3\\1&-3&3\\-1&-2&-2\end{pmatrix}$
Note:
- Not every square matrix is invertible
- For two square matrices A and B. if AB exists and is invertible, then $(AB)^{-1} = B^{-1} A^{-1}$
3.2. Solution of System of Linear Equations Using Crammer’s Rule
Crammer’s Rule:
consider the system of linear equations of two variables x and y:
$\begin{cases}a_1x +b_1y = c_1\\a_2x +b_2y = c_2\end{cases}$
Let A = $\begin{pmatrix}a_1&b_1\\a_2&b_2\end{pmatrix}$ be a coefficient matrix, $A_x = \begin{pmatrix}c_1&b_1\\c_2&b_2\end{pmatrix}$ and $A_y = \begin{pmatrix}a_1&c_1\\a_2&c_2\end{pmatrix}$, then:
x = $\frac{|A_x|}{|A|} = \frac{\begin{vmatrix}c_1&b_1\\c_2&b_2\end{vmatrix}}{\begin{vmatrix}a_1&b_1\\a_2&b_2\end{vmatrix}}$
y = $\frac{|A_y|}{|A|} = \frac{\begin{vmatrix}a_1&c_1\\a_2&c_2\end{vmatrix}}{\begin{vmatrix}a_1&b_1\\a_2&b_2\end{vmatrix}}$
if |A| = 0, then it has two possible solutions
- no solution when$|A_x| \ne0$, $|A_y| \ne 0$
- many solutions when $|A_x| = 0$, $|A_y| = 0$
Example 2 :
1.Solive the system $\begin{cases}2x-3y =7\\3x+5y =1\end{cases}$
Solution:
A = $\begin{pmatrix}2&-3\\3&5\end{pmatrix}$, $|A| = 19$
$A_x = \begin{pmatrix}7&-3\\1&5\end{pmatrix}$ , $|A_x| = 38$
$A_y = \begin{pmatrix}2&7\\3&1\end{pmatrix}$, $|A_y| = -19$
then the system has unique solution since$|A| \ne0$
x = $\frac{|A_x|}{|A|} = \frac{38}{19} = 2$
y = $\frac{|A_y|}{|A|} = \frac{-19}{19} = -1$
Therefore (x,y) = (2, -1)
2.solve the system $\begin{cases}-4x+2y-9z=2\\3x+4y+z=5\\x-3y+2z=8\end{cases}$
Solution:
A= $\begin{pmatrix}-4&2&-9\\3&4&1\\1&-3&2\end{pmatrix}$ and $|A| = 63$
$A_x = \begin{pmatrix}2&2&-9\\5&4&1\\8&-3&2\end{pmatrix}$ and $|A_x| = 441$
$A_y =\begin{pmatrix}-4&2&9\\3&5&1\\1&8&2\end{pmatrix}$ and $|A_y| = -189$
$A_z = \begin{pmatrix}-4&2&2\\3&4&5\\1&-3&8\end{pmatrix}$ and $A_z = -252$
then:
x = $\frac{|A_x|}{|A|} = \frac{441}{63}=7$
y = $\frac{|A_y|}{|A|} = \frac{-189}{63} = -3$
z = $\frac{|A_z|}{|A|} = \frac{-251}{63} = -4$
Therefore the solution (x,y,z) = (7, -3, -4)
3.3. Applications
Polynomial interpolation
Example 3:
Consider the points(1,2), (2,5) and (5,36). Find an interpolating polynomial P(x) of degree at most two and estimate P(2)?
Solution:
Let $P(x) = a+bx+cx^{2}$ be a polynomial of degree 2
P(1) = a + b + c =2
P(2) = a + 2b + 4c = 5
P(3) = a + 5b + 25c = 36
then the system of linear equation made becomes
$\begin{cases}a+b+c=2\\a+2b+4c=5\\a+5b +25b =36\end{cases}$
applying Crammer’s rule:
A =$\begin{pmatrix}1&1&1\\1&2&4\\1&5&25\end{pmatrix}$ and $|A| = -13$
$A_a = \begin{pmatrix}2&1&1\\5&2&4\\36&5&25\end{pmatrix}$ and $|A_a| = 22$
$A_b = \begin{pmatrix}1&2&1\\1&5&4\\1&36&25\end{pmatrix}$ and $|A_b| = -105$
$A_c = \begin{pmatrix}1&1&2\\1&2&5\\1&5&36\end{pmatrix}$ and $|A_c| = 22$
then :
a = $\frac{|A_a|}{|A|} = \frac{22}{-13}=-1.69$
b = $\frac{|A_b|}{|A|} = \frac{-105}{-13} = 8.07$
c = $\frac{|A_c|}{|A|} = \frac{22}{-13} = -1.69$
Therefore the required polynomial is $P(x) = -1.69 +8.07x – 1.69x^{2}$
and $P(2) = -1.69 +8.07(2) -1.69(4) = 7.69$
Area of a Triangle in x,y plane
Let $A(x_1, y_1)$ , $B(x_2, y_2)$ and $C(x_3, y_3)$ be three vertices of a triangle then:
Area($\Delta ABC$) = $\begin{cases}\frac{1}{2} \begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix} if \begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix} >0\\ -\frac{1}{2} \begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix} if \begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix} <0\end{cases}$
Example 4:
Area of a triangle passing through points A(2, 1), B(x, 3x) and C(-1, 4) is 2 sq. unit. Find x?
Solution:
Area of $\Delta ABC$ = 2
case 1: if $\begin{vmatrix}2&1&1\\x&3x&1\\-1&4&1\end{vmatrix} > 0$
A($\Delta ABC$) = $\frac{1}{2}\begin{vmatrix}2&1&1\\x&3x&1\\-1&4&1\end{vmatrix}= \frac{1}{2}(6x-8)-(x+1) +(4x+3x)= 2$
$\implies$ $\frac{12x -9}{2}=2$
$\implies$ $12x – 9 = 4$ $\Leftrightarrow x = \frac{13}{12}$
case 2: if $\begin{vmatrix}2&1&1\\x&3x&1\\-1&4&1\end{vmatrix} < 0$
A($\Delta ABC$) = $-\frac{1}{2}\begin{vmatrix}2&1&1\\x&3x&1\\-1&4&1\end{vmatrix}= -\frac{1}{2}(6x-8)-(x+1) +(4x+3x)= 2$
$\implies$ $\frac{12x -9}{2}=-2$
$\implies$ $12x – 9 = -4$ $\Leftrightarrow x = \frac{5}{12}$
Test for Collinear Points in x,y -Plane
Let $A(x_1, y_1)$ , $B(x_2, y_2)$ and $C(x_3, y_3)$ be three collinear points in xy – plane if and only if $\begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix} = 0$
Example 5:
determine if the following points are collinear or not
a). (0, 2), (1, 1) and (3, -1)
b). (1, 2), (1, 1) and (3, -1)
Solution:
a). test $\begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix}=0$
$\implies$ $\begin{vmatrix}0&2&1\\1&1&1\\3&-1&1\end{vmatrix} = 0 – 2(-2) +1(-4) = 4 – 4 = 0$
implies the points (0, 2), (1, 1) and (3, -1) are collinear
b). (1, 2), (1, 1) and (3, -1) $\implies$ $\begin{vmatrix}1&2&1\\1&1&1\\3&-1&1\end{vmatrix} = 1(2) – 2(-2) +1(-4) = 2 \ne0$
therefore points (1, 2), (1, 1) and (3, -1) are not collinear
Two Point Equation of a Line
Equation of a line passing through points $P(x_1, y_1)$ and $Q(x_2, y_2)$ is given by:
$\begin{vmatrix}x&y&1\\x_1&y_1&1\\x_2&y_2&1\end{vmatrix}=0$ where (x,y) is a point on the line.
Example 6:
Find the general form of equation of a line passing through points P(1,1) and Q(3,2)?
Solution:
The line passing through points P(1,1) and Q(3,2) has equation $\begin{vmatrix}x&y&1\\1&1&1\\3&2&1\end{vmatrix} = 0$ $\Leftrightarrow x(1-2) -y(1-3)+1(2-3) = 0$ $\implies$$-x +2y -1 = 0$
Therefore equation of a line is $-x+2y -1 = 0$