Solveeit Logo

Question

Question: Using matrices, solve the following system of equations: \(3x+4y+7z=4,2x-y+3z=-3,x+2y-3z=8\)...

Using matrices, solve the following system of equations:
3x+4y+7z=4,2xy+3z=3,x+2y3z=83x+4y+7z=4,2x-y+3z=-3,x+2y-3z=8

Explanation

Solution

First things first, we will write the equations given in the above problem in the form of AX=BAX=B where “X” represents the column matrix having elements x, y and z, “A” is a 3×33\times 3 matrix which comprises of the coefficients of x, y and z and “B” is a column matrix contains the numbers 4, -3 and 8. After that find the inverse of matrix A which we are going to find by pre multiplying A1{{A}^{-1}} on both the sides of AX=BAX=B. The inverse of matrix “A” is calculated using this formula A1=adj(A)A{{A}^{-1}}=\dfrac{adj\left( A \right)}{\left| A \right|}. And solutions of the above system of equations are calculated from X=A1BX={{A}^{-1}}B.

Complete step by step answer:
The system of equations given in the above problem is as follows:
3x+4y+7z=4, 2xy+3z=3, x+2y3z=8 \begin{aligned} & 3x+4y+7z=4, \\\ & 2x-y+3z=-3, \\\ & x+2y-3z=8 \\\ \end{aligned}
We have to find the solutions of the above system of equations using matrices.
Let us reduce all the above equations to AX=BAX=B form in which A, X and B are shown below:
The matrix A is a 3×33\times 3 matrix which contains the coefficients of x, y and z and the first, second and third column of the matrix contains coefficients of x, y and z respectively.
A=(347 213 123 )A=\left( \begin{matrix} 3 & 4 & 7 \\\ 2 & -1 & 3 \\\ 1 & 2 & -3 \\\ \end{matrix} \right)
The matrix X is a column matrix which contains three elements x, y and z.
X=(x y z )X=\left( \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right)

The matrix “B” is a column matrix containing the constants of the three equations such as 4, -3 and 8.
B=(4 3 8 )B=\left( \begin{matrix} 4 \\\ -3 \\\ 8 \\\ \end{matrix} \right)
Now, combine all the above elements A, X and B by substituting A, B and X in AX=BAX=B.
AX=BAX=B........ Eq. (1)
(347 213 123 )(x y z )=(4 3 8 )\left( \begin{matrix} 3 & 4 & 7 \\\ 2 & -1 & 3 \\\ 1 & 2 & -3 \\\ \end{matrix} \right)\left( \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right)=\left( \begin{matrix} 4 \\\ -3 \\\ 8 \\\ \end{matrix} \right)
Now, pre multiplying A1{{A}^{-1}} on both the sides of eq. (1) we get,
A1AX=A1B{{A}^{-1}}AX={{A}^{-1}}B
We know that multiplication of A with its inverse gives an identity matrix.
IX=A1BIX={{A}^{-1}}B
Now, we can skip writing the identity matrix, it doesn’t make a big difference then the above equation will look like:
X=A1BX={{A}^{-1}}B
We can find the inverse of A as follows:
A1=adj(A)A{{A}^{-1}}=\dfrac{adj\left( A \right)}{\left| A \right|}………Eq. (2)
In the above formula, A&adj(A)\left| A \right|\And adj\left( A \right) are the determinant of A and adjoint of A so we are going to find the determinant of A and adjoint of A and then substitute their values in the above formula to get the inverse of A.
Finding A\left| A \right| as follows:
A=(347 213 123 )A=\left( \begin{matrix} 3 & 4 & 7 \\\ 2 & -1 & 3 \\\ 1 & 2 & -3 \\\ \end{matrix} \right)
Taking determinant on both the sides we get,
A=347 213 123 \left| A \right|=\left| \begin{matrix} 3 & 4 & 7 \\\ 2 & -1 & 3 \\\ 1 & 2 & -3 \\\ \end{matrix} \right|
We are going to solve the above determinant by expanding the determinant along the first row.
A=3(1(3)(3)(2))4(2(3)3)+(7)(2(2)1(1)) A=3(36)4(63)+7(4+1) A=3(3)4(9)+7(5) A=9+36+35 A=62 \begin{aligned} & \left| A \right|=3\left( -1\left( -3 \right)-\left( 3 \right)\left( 2 \right) \right)-4\left( 2\left( -3 \right)-3 \right)+\left( 7 \right)\left( 2\left( 2 \right)-1\left( -1 \right) \right) \\\ & \Rightarrow \left| A \right|=3\left( 3-6 \right)-4\left( -6-3 \right)+7\left( 4+1 \right) \\\ & \Rightarrow \left| A \right|=3\left( -3 \right)-4\left( -9 \right)+7\left( 5 \right) \\\ & \Rightarrow \left| A \right|=-9+36+35 \\\ & \Rightarrow \left| A \right|=62 \\\ \end{aligned}
Hence, we have found the determinant of A as 62.
Now, we are going to find the adjoint of A.
The matrix A is equal to:
A=(347 213 123 )A=\left( \begin{matrix} 3 & 4 & 7 \\\ 2 & -1 & 3 \\\ 1 & 2 & -3 \\\ \end{matrix} \right)
To find the adjoint of any matrix, first of all we find the cofactor of that matrix then take the transpose of the cofactor matrix.
The cofactor of matrix A contains a cofactor of first row and first column, first row and second column likewise you can name all the positions of the elements. In the below, we are showing the cofactor at the position of first row and first column.
The cofactor of the element lies at ith{{i}^{th}} row and jth{{j}^{th}} column is given below:
Cij=(1)i+j(Mij){{C}_{ij}}={{\left( -1 \right)}^{i+j}}\left( {{M}_{ij}} \right)……….. Eq. (3)
In the above formula, Mij{{M}_{ij}} is the minor corresponding to that ith&jth{{i}^{th}}\And {{j}^{th}} position. Now, we are going to show the minor for element 2 in following matrix A.
A=(347 213 123 )A=\left( \begin{matrix} 3 & 4 & 7 \\\ 2 & -1 & 3 \\\ 1 & 2 & -3 \\\ \end{matrix} \right)
To find the minor for 2 hide the row which contains 2 and hide the column which contains 2. In the below figure, we are hiding them by coloring them red.
A=(347 213 123 )A=\left( \begin{matrix} \color {red} 3 & 4 & 7 \\\ \color {red} 2 & \color {red} -\color {red} 1 & \color {red} 3 \\\ \color {red} 1 & 2 & -3 \\\ \end{matrix} \right)
Now, we will construct the matrix which contains non – red colored numbers as follows:
A=(47 23 )A=\left( \begin{matrix} 4 & 7 \\\ 2 & -3 \\\ \end{matrix} \right)
Now, multiplying 4 by -3 and then subtract this result of multiplication with the multiplication of 2 by 7 we get,
4(3)(2)(7) =1214 =26 \begin{aligned} & 4\left( -3 \right)-\left( 2 \right)\left( 7 \right) \\\ & =-12-14 \\\ & =-26 \\\ \end{aligned}
Now, ith&jth{{i}^{th}}\And {{j}^{th}} corresponding to element 2 is 2, 1 so substituting the value of i, j, minor in eq. (2) we get,
C21=(1)2+1(M21) C21=1(26) C21=26 \begin{aligned} & {{C}_{21}}={{\left( -1 \right)}^{2+1}}\left( {{M}_{21}} \right) \\\ & \Rightarrow {{C}_{21}}=-1\left( -26 \right) \\\ & \Rightarrow {{C}_{21}}=26 \\\ \end{aligned}
Similarly, you can find cofactor of all the elements given in the matrix A. In the below, we have shown calculation of some of the cofactors of the remaining elements:
We are showing the minors of the matrix as follows:
Finding M11{{M}_{11}} as follows:
A=(347 213 123 )A=\left( \begin{matrix} \color {red} 3 & \color {red} 4 & \color {red} 7 \\\ \color {red} 2 & -1 & 3 \\\ \color {red} 1 & 2 & -3 \\\ \end{matrix} \right)
Now, the determinant value of the non – red colored numbers is equal to:
(1)(3)(3)(2) =36 =3 \begin{aligned} & \left( -1 \right)\left( -3 \right)-\left( 3 \right)\left( 2 \right) \\\ & =3-6 \\\ & =-3 \\\ \end{aligned}
Hence, we got the value of M11{{M}_{11}} equals -3
In the below, we are finding the value of M12,M13,M22,M23,M31,M32,M33{{M}_{12}},{{M}_{13}},{{M}_{22}},{{M}_{23}},{{M}_{31}},{{M}_{32}},{{M}_{33}} as follows:
M12=(347 213 123 ){{M}_{12}}=\left( \begin{matrix} \color {red} 3 & \color {red} 4 & \color {red} 7 \\\ 2 & \color {red} -\color {red} 1 & 3 \\\ 1 & \color {red} 2 & -3 \\\ \end{matrix} \right)
M12=2(3)3 M12=63=9 \begin{aligned} & {{M}_{12}}=2\left( -3 \right)-3 \\\ & \Rightarrow {{M}_{12}}=-6-3=-9 \\\ \end{aligned}
M13=(347 213 123 ) M13=2(2)1=3 \begin{aligned} & {{M}_{13}}=\left( \begin{matrix} \color {red} 3 & \color {red} 4 & \color {red} 7 \\\ 2 & -1 & \color {red} 3 \\\ 1 & 2 & \color {red} -\color {red} 3 \\\ \end{matrix} \right) \\\ &\Rightarrow {{M}_{13}}=2\left( 2 \right)-1=3 \\\ \end{aligned}
M22=(347 213 123 ) M22=3(3)7=16 \begin{aligned} & {{M}_{22}}=\left( \begin{matrix} 3 & \color {red} 4 & 7 \\\ \color {red} 2 & \color {red} -\color {red} 1 & \color {red} 3 \\\ 1 & \color {red} 2 & -3 \\\ \end{matrix} \right) \\\ &\Rightarrow {{M}_{22}}=3\left( -3 \right)-7=-16 \\\ \end{aligned}
M23=(347 213 123 ) M23=3(2)4=2 \begin{aligned} & {{M}_{23}}=\left( \begin{matrix} 3 & 4 & \color {red} 7 \\\ \color {red} 2 & \color {red} -\color {red} 1 & \color {red} 3 \\\ 1 & 2 & \color {red} -\color {red} 3 \\\ \end{matrix} \right) \\\ &\Rightarrow {{M}_{23}}=3\left( 2 \right)-4=2 \\\ \end{aligned}
M31=(347 213 123 ) M31=4(3)7(1)=12+7=19 \begin{aligned} & {{M}_{31}}=\left( \begin{matrix} \color {red} 3 & 4 & 7 \\\ \color {red} 2 & -1 & 3 \\\ \color {red} 1 & \color {red} 2 & \color {red} -\color {red} 3 \\\ \end{matrix} \right) \\\ & \Rightarrow {{M}_{31}}=4\left( 3 \right)-7\left( -1 \right)=12+7=19 \\\ \end{aligned}
M32=(347 213 123 ) M32=3(3)7(2)=914=5 \begin{aligned} & {{M}_{32}}=\left( \begin{matrix} 3 & \color {red} 4 & 7 \\\ 2 & \color {red} -\color {red} 1 & 3 \\\ \color {red} 1 & \color {red} 2 & \color {red} -\color {red} 3 \\\ \end{matrix} \right) \\\ & \Rightarrow {{M}_{32}}=3\left( 3 \right)-7\left( 2 \right)=9-14=-5 \\\ \end{aligned}
M33=(347 213 123 ) M33=1(3)4(2)=38=11 \begin{aligned} & {{M}_{33}}=\left( \begin{matrix} 3 & 4 & \color {red} 7 \\\ 2 & -1 & \color {red} 3 \\\ \color {red} 1 & \color {red} 2 & \color {red} -\color {red} 3 \\\ \end{matrix} \right) \\\ & \Rightarrow {{M}_{33}}=-1\left( 3 \right)-4\left( 2 \right)=-3-8=-11 \\\ \end{aligned}
Now, you can substitute these values of minors in the cofactor expression and find the values of cofactors.
C11=(1)1+1(3) C11=3 \begin{aligned} & {{C}_{11}}={{\left( -1 \right)}^{1+1}}\left( -3 \right) \\\ & \Rightarrow {{C}_{11}}=-3 \\\ \end{aligned}
C12=(1)1+2(9) C12=9 \begin{aligned} & {{C}_{12}}={{\left( -1 \right)}^{1+2}}\left( -9 \right) \\\ & \Rightarrow {{C}_{12}}=9 \\\ \end{aligned}
C13=(1)1+3(3) C12=3 \begin{aligned} & {{C}_{13}}={{\left( -1 \right)}^{1+3}}\left( 3 \right) \\\ & \Rightarrow {{C}_{12}}=3 \\\ \end{aligned}
C21=(1)2+1(26) C21=26 \begin{aligned} & {{C}_{21}}={{\left( -1 \right)}^{2+1}}\left( -26 \right) \\\ & \Rightarrow {{C}_{21}}=26 \\\ \end{aligned}
C22=(1)2+2(16) C22=16 \begin{aligned} & {{C}_{22}}={{\left( -1 \right)}^{2+2}}\left( -16 \right) \\\ & \Rightarrow {{C}_{22}}=16 \\\ \end{aligned}
C23=(1)2+3(2) C23=2 \begin{aligned} & {{C}_{23}}={{\left( -1 \right)}^{2+3}}\left( 2 \right) \\\ & \Rightarrow {{C}_{23}}=-2 \\\ \end{aligned}
C31=(1)3+1(19) C31=19 \begin{aligned} & {{C}_{31}}={{\left( -1 \right)}^{3+1}}\left( 19 \right) \\\ & \Rightarrow {{C}_{31}}=19 \\\ \end{aligned}
C32=(1)3+2(5) C32=5 \begin{aligned} & {{C}_{32}}={{\left( -1 \right)}^{3+2}}\left( -5 \right) \\\ & \Rightarrow {{C}_{32}}=5 \\\ \end{aligned}
C33=(1)3+3(11) C33=11 \begin{aligned} & {{C}_{33}}={{\left( -1 \right)}^{3+3}}\left( -11 \right) \\\ & \Rightarrow {{C}_{33}}=-11 \\\ \end{aligned}
Now, writing the cofactors of the matrix A we get,
(395 26162 19511 )\left( \begin{matrix} -3 & 9 & 5 \\\ 26 & -16 & -2 \\\ 19 & 5 & -11 \\\ \end{matrix} \right)
Now, taking transpose of the above matrix we get,

-3 & 9 & 5 \\\ 26 & -16 & -2 \\\ 19 & 5 & -11 \\\ \end{matrix} \right)}^{T}}=\left( \begin{matrix} -3 & 26 & 19 \\\ 9 & -16 & 5 \\\ 5 & -2 & -11 \\\ \end{matrix} \right)$$ Hence, we have got the adjoint of the matrix A as: $adj\left( A \right)=\left( \begin{matrix} -3 & 26 & 19 \\\ 9 & -16 & 5 \\\ 5 & -2 & -11 \\\ \end{matrix} \right)$ Now, substituting the value of determinant of A and adjoint of A in eq. (2) we get, ${{A}^{-1}}=\dfrac{adj\left( A \right)}{\left| A \right|}$ ${{A}^{-1}}=\dfrac{1}{62}\left( \begin{matrix} -3 & 26 & 19 \\\ 9 & -16 & 5 \\\ 5 & -2 & -11 \\\ \end{matrix} \right)$ Now, multiplying $\dfrac{1}{6}$ to every element of the above matrix we get, ${{A}^{-1}}=\left( \begin{matrix} \dfrac{-3}{62} & \dfrac{26}{62} & \dfrac{19}{62} \\\ \dfrac{9}{62} & \dfrac{-16}{62} & \dfrac{5}{62} \\\ \dfrac{5}{62} & \dfrac{-2}{62} & \dfrac{-11}{62} \\\ \end{matrix} \right)$ Now, substituting the value of B and ${{A}^{-1}}$ in $X={{A}^{-1}}B$ we get, $\left( \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right)=\left( \begin{matrix} \dfrac{-3}{62} & \dfrac{26}{62} & \dfrac{19}{62} \\\ \dfrac{9}{62} & \dfrac{-16}{62} & \dfrac{5}{62} \\\ \dfrac{5}{62} & \dfrac{-2}{62} & \dfrac{-11}{62} \\\ \end{matrix} \right)\left( \begin{matrix} 4 \\\ -3 \\\ 8 \\\ \end{matrix} \right)$ Now, multiplying right hand side of the above equation we get, $\left( \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right)=\left( \begin{matrix} -\dfrac{3}{62}\left( 4 \right)+\dfrac{26}{62}\left( -3 \right)+\dfrac{19}{62}\left( 8 \right) \\\ \dfrac{9}{62}\left( 4 \right)-\dfrac{16}{62}\left( -3 \right)+\dfrac{5}{62}\left( 8 \right) \\\ \dfrac{5}{62}\left( 4 \right)-\dfrac{2}{62}\left( -3 \right)-\dfrac{11}{62}\left( 8 \right) \\\ \end{matrix} \right)$ $\Rightarrow \left( \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right)=\left( \begin{matrix} \dfrac{-12-78+152}{62} \\\ \dfrac{36+48+40}{62} \\\ \dfrac{20+6-88}{62} \\\ \end{matrix} \right)$ $\begin{aligned} & \Rightarrow \left( \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right)=\left( \begin{matrix} \dfrac{62}{62} \\\ \dfrac{124}{62} \\\ \dfrac{-62}{62} \\\ \end{matrix} \right) \\\ & \Rightarrow \left( \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right)=\left( \begin{matrix} 1 \\\ 2 \\\ -1 \\\ \end{matrix} \right) \\\ \end{aligned}$ From the above equation, we have got the value of x, y and z as: $x=1;y=2;z=-1$ **Hence, we have got the value of x, y and z as 1, 2 and -1 respectively.** **Note:** You can check the values of x, y and z that you got above by substituting these values in any one of the given equations and see whether these values are satisfying that equation or not. The values of x, y and z that we have got above is as follows: $x=1;y=2;z=-1$ Substituting the above values in $3x+4y+7z=4$ we get, $\begin{aligned} & 3\left( 1 \right)+4\left( 2 \right)+7\left( -1 \right)=4 \\\ & \Rightarrow 3+8-7=4 \\\ & \Rightarrow 11-7=4 \\\ & \Rightarrow 4=4 \\\ \end{aligned}$ As you can see that L.H.S is equal to R.H.S so we have shown that the values of x, y and z that we have solved is satisfying one of the given equations. Hence, we have verified that the values of x, y and z that we got are correct.