Answer on Question #82880 – Math – Linear Algebra
Question
Solve the following equations using matrix algebra:
2 x + y − z = 11 x − 2 y + 2 z = − 2 3 x − y + 3 z = 5 \begin{array}{l}
2x + y - z = 11 \\
x - 2y + 2z = -2 \\
3x - y + 3z = 5 \\
\end{array} 2 x + y − z = 11 x − 2 y + 2 z = − 2 3 x − y + 3 z = 5 Solution
Method 1
Write the linear system in matrix form A X = B AX = B A X = B , where A A A is coefficient matrix of the linear system:
[ 2 1 − 1 1 − 2 2 3 − 1 3 ] ⋅ [ x y z ] = [ 11 − 2 5 ] , A = [ 2 1 − 1 1 − 2 2 3 − 1 3 ] , X = [ x y z ] , B = [ 11 − 2 5 ] . \left[ \begin{array}{rrr}
2 & 1 & -1 \\
1 & -2 & 2 \\
3 & -1 & 3
\end{array} \right] \cdot \left[ \begin{array}{c}
x \\
y \\
z
\end{array} \right] = \left[ \begin{array}{c}
11 \\
-2 \\
5
\end{array} \right], \quad
A = \left[ \begin{array}{rrr}
2 & 1 & -1 \\
1 & -2 & 2 \\
3 & -1 & 3
\end{array} \right], \quad
X = \left[ \begin{array}{c}
x \\
y \\
z
\end{array} \right], \quad
B = \left[ \begin{array}{c}
11 \\
-2 \\
5
\end{array} \right]. ⎣ ⎡ 2 1 3 1 − 2 − 1 − 1 2 3 ⎦ ⎤ ⋅ ⎣ ⎡ x y z ⎦ ⎤ = ⎣ ⎡ 11 − 2 5 ⎦ ⎤ , A = ⎣ ⎡ 2 1 3 1 − 2 − 1 − 1 2 3 ⎦ ⎤ , X = ⎣ ⎡ x y z ⎦ ⎤ , B = ⎣ ⎡ 11 − 2 5 ⎦ ⎤ .
Calculate the determinant of the coefficient matrix A A A :
\det(A) = |A| = \left| \begin{array}{rrr}
2 & 1 & -1 \\
1 & -2 & 2 \\
3 & -1 & 3
\end{array} \right| = 2 \cdot (-2) \cdot 3 + 1 \cdot 3 \cdot 2 + 1 \cdot (-1) \cdot (-1) - (-1) \cdot (-2) \cdot 3 - 1. \right − 1 ⋅ 1 ⋅ 3 − 2 ⋅ 2 ⋅ ( − 1 ) = − 12 + 6 + 1 − 6 − 3 + 4 = − 10 ≠ 0. -1 \cdot 1 \cdot 3 - 2 \cdot 2 \cdot (-1) = -12 + 6 + 1 - 6 - 3 + 4 = -10 \neq 0. − 1 ⋅ 1 ⋅ 3 − 2 ⋅ 2 ⋅ ( − 1 ) = − 12 + 6 + 1 − 6 − 3 + 4 = − 10 = 0.
So linear system A X = B AX = B A X = B has only one solution, because det ( A ) ≠ 0 \det(A) \neq 0 det ( A ) = 0 , det ( A ) = D = − 10 \det(A) = D = -10 det ( A ) = D = − 10 .
We can find the X X X matrix by multiplying the inverse of the A A A matrix by the B B B matrix:
X = A − 1 B . X = A^{-1} B. X = A − 1 B .
First, we need to find the inverse of the A A A matrix. The A A A matrix is invertible because det ( A ) = − 10 ≠ 0 \det(A) = -10 \neq 0 det ( A ) = − 10 = 0 . Use the adjoint method to find A − 1 A^{-1} A − 1 . Calculate the cofactors of each element.
c 11 = ( − 1 ) 1 + 1 ∣ − 2 2 − 1 3 ∣ = − 6 + 2 = − 4 , c 12 = ( − 1 ) 1 + 2 ∣ 1 2 3 3 ∣ = − 1 ( 3 − 6 ) = 3 , c_{11} = (-1)^{1+1} \left| \begin{array}{cc}
-2 & 2 \\
-1 & 3
\end{array} \right| = -6 + 2 = -4, \quad
c_{12} = (-1)^{1+2} \left| \begin{array}{cc}
1 & 2 \\
3 & 3
\end{array} \right| = -1(3 - 6) = 3, c 11 = ( − 1 ) 1 + 1 ∣ ∣ − 2 − 1 2 3 ∣ ∣ = − 6 + 2 = − 4 , c 12 = ( − 1 ) 1 + 2 ∣ ∣ 1 3 2 3 ∣ ∣ = − 1 ( 3 − 6 ) = 3 , c 13 = ( − 1 ) 1 + 3 ∣ 1 − 2 3 − 1 ∣ = − 1 + 6 = 5 , c 21 = ( − 1 ) 2 + 1 ∣ 1 − 1 − 1 3 ∣ = − 1 ( 3 − 1 ) = − 2 , c_{13} = (-1)^{1+3} \begin{vmatrix} 1 & -2 \\ 3 & -1 \end{vmatrix} = -1 + 6 = 5, \quad c_{21} = (-1)^{2+1} \begin{vmatrix} 1 & -1 \\ -1 & 3 \end{vmatrix} = -1(3 - 1) = -2, c 13 = ( − 1 ) 1 + 3 ∣ ∣ 1 3 − 2 − 1 ∣ ∣ = − 1 + 6 = 5 , c 21 = ( − 1 ) 2 + 1 ∣ ∣ 1 − 1 − 1 3 ∣ ∣ = − 1 ( 3 − 1 ) = − 2 , c 22 = ( − 1 ) 2 + 2 ∣ 2 − 1 3 3 ∣ = 6 + 3 = 9 , c 23 = ( − 1 ) 2 + 3 ∣ 2 1 3 − 1 ∣ = − 1 ( − 2 − 3 ) = 5 , c_{22} = (-1)^{2+2} \begin{vmatrix} 2 & -1 \\ 3 & 3 \end{vmatrix} = 6 + 3 = 9, \quad c_{23} = (-1)^{2+3} \begin{vmatrix} 2 & 1 \\ 3 & -1 \end{vmatrix} = -1(-2 - 3) = 5, c 22 = ( − 1 ) 2 + 2 ∣ ∣ 2 3 − 1 3 ∣ ∣ = 6 + 3 = 9 , c 23 = ( − 1 ) 2 + 3 ∣ ∣ 2 3 1 − 1 ∣ ∣ = − 1 ( − 2 − 3 ) = 5 , c 31 = ( − 1 ) 3 + 1 ∣ 1 − 1 − 2 2 ∣ = 2 − 2 = 0 , c 32 = ( − 1 ) 3 + 2 ∣ 2 − 1 1 2 ∣ = − 1 ( 4 + 1 ) = − 5 , c_{31} = (-1)^{3+1} \begin{vmatrix} 1 & -1 \\ -2 & 2 \end{vmatrix} = 2 - 2 = 0, \quad c_{32} = (-1)^{3+2} \begin{vmatrix} 2 & -1 \\ 1 & 2 \end{vmatrix} = -1(4 + 1) = -5, c 31 = ( − 1 ) 3 + 1 ∣ ∣ 1 − 2 − 1 2 ∣ ∣ = 2 − 2 = 0 , c 32 = ( − 1 ) 3 + 2 ∣ ∣ 2 1 − 1 2 ∣ ∣ = − 1 ( 4 + 1 ) = − 5 , c 33 = ( − 1 ) 3 + 3 ∣ 2 1 1 − 2 ∣ = − 4 − 1 = − 5. c_{33} = (-1)^{3+3} \begin{vmatrix} 2 & 1 \\ 1 & -2 \end{vmatrix} = -4 - 1 = -5. c 33 = ( − 1 ) 3 + 3 ∣ ∣ 2 1 1 − 2 ∣ ∣ = − 4 − 1 = − 5.
Write cofactor matrix C:
C = [ c 11 c 12 c 13 c 21 c 21 23 c 31 c 32 c 33 ] , so C = [ − 4 3 5 − 2 9 5 0 − 5 − 5 ] adj A = C T = [ − 4 − 2 0 3 9 − 5 5 5 − 5 ] , C = \begin{bmatrix} c_{11} & c_{12} & c_{13} \\ c_{21} & c_{21} & _{23} \\ c_{31} & c_{32} & c_{33} \end{bmatrix}, \quad \text{so} \quad C = \begin{bmatrix} -4 & 3 & 5 \\ -2 & 9 & 5 \\ 0 & -5 & -5 \end{bmatrix} \quad \text{adj} \quad A = C^T = \begin{bmatrix} -4 & -2 & 0 \\ 3 & 9 & -5 \\ 5 & 5 & -5 \end{bmatrix}, C = ⎣ ⎡ c 11 c 21 c 31 c 12 c 21 c 32 c 13 23 c 33 ⎦ ⎤ , so C = ⎣ ⎡ − 4 − 2 0 3 9 − 5 5 5 − 5 ⎦ ⎤ adj A = C T = ⎣ ⎡ − 4 3 5 − 2 9 5 0 − 5 − 5 ⎦ ⎤ , A − 1 = 1 det ( B ) adj A , A − 1 = − 1 10 [ − 4 − 2 0 3 9 − 5 5 5 − 5 ] = [ 2 5 1 5 0 − 3 10 − 9 10 1 2 − 1 2 − 1 2 1 2 ] . A^{-1} = \frac{1}{\det(B)} \quad \text{adj} \quad A, \quad A^{-1} = -\frac{1}{10} \begin{bmatrix} -4 & -2 & 0 \\ 3 & 9 & -5 \\ 5 & 5 & -5 \end{bmatrix} = \begin{bmatrix} \frac{2}{5} & \frac{1}{5} & 0 \\ -\frac{3}{10} & -\frac{9}{10} & \frac{1}{2} \\ -\frac{1}{2} & -\frac{1}{2} & \frac{1}{2} \end{bmatrix}. A − 1 = det ( B ) 1 adj A , A − 1 = − 10 1 ⎣ ⎡ − 4 3 5 − 2 9 5 0 − 5 − 5 ⎦ ⎤ = ⎣ ⎡ 5 2 − 10 3 − 2 1 5 1 − 10 9 − 2 1 0 2 1 2 1 ⎦ ⎤ .
Then find X = A − 1 B X = A^{-1}B X = A − 1 B :
x y z = − 1 10 [ − 4 − 2 0 3 9 − 5 5 5 − 5 ] [ 11 − 2 5 ] = − 1 10 [ − 4 ⋅ 11 − 2 ⋅ ( − 2 ) + 0 ⋅ 5 3 ⋅ 11 − 9 ⋅ 2 − 5 ⋅ 5 5 ⋅ 11 − 5 ⋅ 2 − 5 ⋅ 5 ] = − 1 10 [ − 40 − 10 20 ] = [ 4 1 − 2 ] \begin{aligned}
& x \\
& y \\
& z
\end{aligned}
= -\frac{1}{10} \begin{bmatrix} -4 & -2 & 0 \\ 3 & 9 & -5 \\ 5 & 5 & -5 \end{bmatrix} \begin{bmatrix} 11 \\ -2 \\ 5 \end{bmatrix} = -\frac{1}{10} \begin{bmatrix} -4 \cdot 11 - 2 \cdot (-2) + 0 \cdot 5 \\ 3 \cdot 11 - 9 \cdot 2 - 5 \cdot 5 \\ 5 \cdot 11 - 5 \cdot 2 - 5 \cdot 5 \end{bmatrix} = -\frac{1}{10} \begin{bmatrix} -40 \\ -10 \\ 20 \end{bmatrix} = \begin{bmatrix} 4 \\ 1 \\ -2 \end{bmatrix} x y z = − 10 1 ⎣ ⎡ − 4 3 5 − 2 9 5 0 − 5 − 5 ⎦ ⎤ ⎣ ⎡ 11 − 2 5 ⎦ ⎤ = − 10 1 ⎣ ⎡ − 4 ⋅ 11 − 2 ⋅ ( − 2 ) + 0 ⋅ 5 3 ⋅ 11 − 9 ⋅ 2 − 5 ⋅ 5 5 ⋅ 11 − 5 ⋅ 2 − 5 ⋅ 5 ⎦ ⎤ = − 10 1 ⎣ ⎡ − 40 − 10 20 ⎦ ⎤ = ⎣ ⎡ 4 1 − 2 ⎦ ⎤
Answer:
x = 4 , y = 1 , z = − 2. x = 4, \quad y = 1, \quad z = -2. x = 4 , y = 1 , z = − 2. Method 2
We also can use Cramer’s Rule to solve the linear system, where
x = D x D , = D y D , z = D z D , x = \frac{D_x}{D}, \quad = \frac{D_y}{D}, \quad z = \frac{D_z}{D}, x = D D x , = D D y , z = D D z ,
and the determinants D x , D y , D z D_x, D_y, D_z D x , D y , D z are determined by replacing the coefficient of x x x or y y y or z z z in the matrix A A A by the constant terms B B B .
D = ∣ A ∣ = − 10. Find D x , D y , D z : D = |A| = -10. \quad \text{Find} \quad D_x, D_y, D_z: D = ∣ A ∣ = − 10. Find D x , D y , D z : D x = ∣ 11 1 − 1 − 2 − 2 2 5 − 1 3 ∣ = 11 ⋅ ( − 2 ) ⋅ 3 + 1 ⋅ 5 ⋅ 2 − 2 ⋅ ( − 1 ) ⋅ ( − 1 ) + 1 ⋅ ( − 2 ) ⋅ 5 − D _ {x} = \left| \begin{array}{c c c} 11 & 1 & -1 \\ -2 & -2 & 2 \\ 5 & -1 & 3 \end{array} \right| = 11 \cdot (-2) \cdot 3 + 1 \cdot 5 \cdot 2 - 2 \cdot (-1) \cdot (-1) + 1 \cdot (-2) \cdot 5 - D x = ∣ ∣ 11 − 2 5 1 − 2 − 1 − 1 2 3 ∣ ∣ = 11 ⋅ ( − 2 ) ⋅ 3 + 1 ⋅ 5 ⋅ 2 − 2 ⋅ ( − 1 ) ⋅ ( − 1 ) + 1 ⋅ ( − 2 ) ⋅ 5 − − 1 ⋅ 3 ⋅ ( − 2 ) − 11 ⋅ ( − 1 ) ⋅ 2 = − 66 + 10 − 2 − 10 + 6 + 22 = − 40 , -1 \cdot 3 \cdot (-2) - 11 \cdot (-1) \cdot 2 = -66 + 10 - 2 - 10 + 6 + 22 = -40, − 1 ⋅ 3 ⋅ ( − 2 ) − 11 ⋅ ( − 1 ) ⋅ 2 = − 66 + 10 − 2 − 10 + 6 + 22 = − 40 , D y = ∣ 2 11 − 1 1 − 2 2 3 5 3 ∣ = 2 ⋅ ( − 2 ) ⋅ 3 + 11 ⋅ 3 ⋅ 2 − 1 ⋅ 1 ⋅ 5 + 1 ⋅ ( − 2 ) ⋅ 3 − 2 ⋅ 5 ⋅ 2 − 3 ⋅ 11 ⋅ 1 = D _ {y} = \left| \begin{array}{c c c} 2 & 11 & -1 \\ 1 & -2 & 2 \\ 3 & 5 & 3 \end{array} \right| = 2 \cdot (-2) \cdot 3 + 11 \cdot 3 \cdot 2 - 1 \cdot 1 \cdot 5 + 1 \cdot (-2) \cdot 3 - 2 \cdot 5 \cdot 2 - 3 \cdot 11 \cdot 1 = D y = ∣ ∣ 2 1 3 11 − 2 5 − 1 2 3 ∣ ∣ = 2 ⋅ ( − 2 ) ⋅ 3 + 11 ⋅ 3 ⋅ 2 − 1 ⋅ 1 ⋅ 5 + 1 ⋅ ( − 2 ) ⋅ 3 − 2 ⋅ 5 ⋅ 2 − 3 ⋅ 11 ⋅ 1 = = − 12 + 66 − 5 − 6 − 20 − 33 = − 10 , = -12 + 66 - 5 - 6 - 20 - 33 = -10, = − 12 + 66 − 5 − 6 − 20 − 33 = − 10 , D z = ∣ 2 1 11 1 − 2 − 2 3 − 1 5 ∣ = 2 ⋅ ( − 2 ) ⋅ 5 + 1 ⋅ 11 ⋅ ( − 1 ) + 1 ⋅ 3 ⋅ ( − 2 ) − 11 ⋅ ( − 2 ) ⋅ 3 − 1 ⋅ 5 ⋅ 1 − D _ {z} = \left| \begin{array}{c c c} 2 & 1 & 11 \\ 1 & -2 & -2 \\ 3 & -1 & 5 \end{array} \right| = 2 \cdot (-2) \cdot 5 + 1 \cdot 11 \cdot (-1) + 1 \cdot 3 \cdot (-2) - 11 \cdot (-2) \cdot 3 - 1 \cdot 5 \cdot 1 - D z = ∣ ∣ 2 1 3 1 − 2 − 1 11 − 2 5 ∣ ∣ = 2 ⋅ ( − 2 ) ⋅ 5 + 1 ⋅ 11 ⋅ ( − 1 ) + 1 ⋅ 3 ⋅ ( − 2 ) − 11 ⋅ ( − 2 ) ⋅ 3 − 1 ⋅ 5 ⋅ 1 − − 2 ⋅ ( − 1 ) ⋅ ( − 2 ) = − 20 − 11 − 6 + 66 − 5 − 4 = 20. -2 \cdot (-1) \cdot (-2) = -20 - 11 - 6 + 66 - 5 - 4 = 20. − 2 ⋅ ( − 1 ) ⋅ ( − 2 ) = − 20 − 11 − 6 + 66 − 5 − 4 = 20. x = D x D = − 40 − 10 = 4 , x = \frac {D _ {x}}{D} = \frac {-40}{-10} = 4, x = D D x = − 10 − 40 = 4 , y = D y D = − 10 − 10 = 1 , y = \frac {D _ {y}}{D} = \frac {-10}{-10} = 1, y = D D y = − 10 − 10 = 1 , z = D z D = 20 − 10 = − 2. z = \frac {D _ {z}}{D} = \frac {20}{-10} = -2. z = D D z = − 10 20 = − 2.
Answer:
x = 4 , y = 1 , z = − 2. x = 4, y = 1, z = -2. x = 4 , y = 1 , z = − 2.
Answer provided by https://www.AssignmentExpert.com