Class 12 Maths, Worked in Full Past papersGet updates
Chapter 4 · Determinants

Exercise 4.5 · Q13: Solve 2x+3y+3z=52x+3y+3z=5⁠, x−2y+z=−4x-2y+z=-4⁠, 3x−y−2z=33x-y-2z=3 by the matrix method

Exercise 4.5Solving systems AX = B · Section 4.6.1
The question

Solve system of linear equations, using matrix method, in Exercises 7 to 14.

13.

2x+3y+3z=5x−2y+z=−43x−y−2z=3\begin{aligned} 2x + 3y + 3z &= 5\\ x - 2y + z &= -4\\ 3x - y - 2z &= 3 \end{aligned}
Exam answer

The system is AX=BAX = B⁠, where

A=[2331−213−1−2],X=[xyz], B=[5−43]\begin{aligned} A &= \begin{bmatrix} 2 & 3 & 3 \\ 1 & -2 & 1 \\ 3 & -1 & -2 \end{bmatrix}, \\ X &= \begin{bmatrix} x \\ y \\ z \end{bmatrix},\ B = \begin{bmatrix} 5 \\ -4 \\ 3 \end{bmatrix} \end{aligned}

Expanding along R2R_2⁠:

∣A∣=−1∣33−1−2∣+(−2)∣233−2∣−1∣233−1∣=−1(−3)−2(−13)−1(−11)=40\begin{aligned} |A| &= -1\begin{vmatrix} 3 & 3 \\ -1 & -2 \end{vmatrix} \\ &\quad + (-2)\begin{vmatrix} 2 & 3 \\ 3 & -2 \end{vmatrix} \\ &\quad - 1\begin{vmatrix} 2 & 3 \\ 3 & -1 \end{vmatrix} \\ &= -1(-3) - 2(-13) - 1(-11) \\ &= 40 \end{aligned}

∣A∣=40≠0|A| = 40 \ne 0⁠. So A−1A^{-1} exists and the system has a unique solution, X=A−1BX = A^{-1}B⁠.

Cofactors:

A11=∣−21−1−2∣=5A12=−∣113−2∣=5A13=∣1−23−1∣=5\begin{aligned} A_{11} &= \begin{vmatrix} -2 & 1 \\ -1 & -2 \end{vmatrix} = 5 \\ A_{12} &= -\begin{vmatrix} 1 & 1 \\ 3 & -2 \end{vmatrix} = 5 \\ A_{13} &= \begin{vmatrix} 1 & -2 \\ 3 & -1 \end{vmatrix} = 5 \end{aligned} A21=−∣33−1−2∣=3A22=∣233−2∣=−13A23=−∣233−1∣=11\begin{aligned} A_{21} &= -\begin{vmatrix} 3 & 3 \\ -1 & -2 \end{vmatrix} = 3 \\ A_{22} &= \begin{vmatrix} 2 & 3 \\ 3 & -2 \end{vmatrix} = -13 \\ A_{23} &= -\begin{vmatrix} 2 & 3 \\ 3 & -1 \end{vmatrix} = 11 \end{aligned} A31=∣33−21∣=9A32=−∣2311∣=1A33=∣231−2∣=−7\begin{aligned} A_{31} &= \begin{vmatrix} 3 & 3 \\ -2 & 1 \end{vmatrix} = 9 \\ A_{32} &= -\begin{vmatrix} 2 & 3 \\ 1 & 1 \end{vmatrix} = 1 \\ A_{33} &= \begin{vmatrix} 2 & 3 \\ 1 & -2 \end{vmatrix} = -7 \end{aligned} adj⁡A=[5395−131511−7]A−1=1∣A∣adj⁡A=140[5395−131511−7]\begin{aligned} \operatorname{adj}A &= \begin{bmatrix} 5 & 3 & 9 \\ 5 & -13 & 1 \\ 5 & 11 & -7 \end{bmatrix} \\ A^{-1} &= \frac{1}{|A|}\operatorname{adj}A \\ &= \frac{1}{40}\begin{bmatrix} 5 & 3 & 9 \\ 5 & -13 & 1 \\ 5 & 11 & -7 \end{bmatrix} \end{aligned} X=A−1B=140[5395−131511−7][5−43]=140[25−12+2725+52+325−44−21]=140[4080−40]=[12−1]\begin{aligned} X &= A^{-1}B \\ &= \frac{1}{40}\begin{bmatrix} 5 & 3 & 9 \\ 5 & -13 & 1 \\ 5 & 11 & -7 \end{bmatrix}\begin{bmatrix} 5 \\ -4 \\ 3 \end{bmatrix} \\ &= \frac{1}{40}\begin{bmatrix} 25 - 12 + 27 \\ 25 + 52 + 3 \\ 25 - 44 - 21 \end{bmatrix} \\ &= \frac{1}{40}\begin{bmatrix} 40 \\ 80 \\ -40 \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\ -1 \end{bmatrix} \end{aligned}

∴ x=1, y=2, z=−1\therefore\ x = 1,\ y = 2,\ z = -1⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

As a matrix equation the system is AX=BAX = B⁠. Because ∣A∣≠0|A| \ne 0⁠, AA has the inverse A−1=1∣A∣adj⁡AA^{-1} = \frac{1}{|A|}\operatorname{adj} A⁠, and multiplying AX=BAX = B on the left by it gives the unique solution X=A−1BX = A^{-1}B.

Given, to find, and the plan
Given
2x+3y+3z=52x + 3y + 3z = 5⁠, x−2y+z=−4x - 2y + z = -4⁠, 3x−y−2z=33x - y - 2z = 3⁠.
To find
xx⁠, yy⁠, zz by the matrix method.
Plan
(1) AX=BAX = B⁠. (2) All nine minors and cofactors. (3) ∣A∣|A| by expanding along row 2 (its entries are smallest). (4) adj⁡A\operatorname{adj} A⁠, A−1A^{-1}⁠. (5) Check A(adj⁡A)=∣A∣ IA(\operatorname{adj} A) = |A|\,I⁠. (6) X=A−1BX = A^{-1}B⁠. (7) Check.

Basics you need

1A system is a matrix product

Row ii of AA times XX is the left side of equation ii⁠; AX=BAX = B holds exactly when all three equations hold. Basics: matrix facts the chapter uses

2Signs for each position

(−1)i+j(-1)^{i+j} gives the pattern + − ++\,-\,+ in rows 1 and 3, and − + −-\,+\,- in row 2. Expanding along row 2 therefore starts with a minus. Basics: the + − + sign pattern

3Minor, cofactor, adjoint

MijM_{ij}⁠: delete row ii and column jj⁠. Aij=(−1)i+jMijA_{ij} = (-1)^{i+j}M_{ij}⁠. adj⁡A\operatorname{adj} A is the transpose of [Aij][A_{ij}]⁠. Basics: where the determinant comes from

4The inverse divides by ∣A∣|A|

A(adj⁡A)=∣A∣ IA(\operatorname{adj} A) = |A|\,I⁠, so A−1=1∣A∣adj⁡AA^{-1} = \frac{1}{|A|}\operatorname{adj} A when ∣A∣≠0|A| \ne 0⁠. Basics: why the inverse divides by |A|

Solution

  1. Write the system as AX=BAX = B

    A=[2331−213−1−2],A = \begin{bmatrix} 2 & 3 & 3 \\ 1 & -2 & 1 \\ 3 & -1 & -2 \end{bmatrix}, X=[xyz],B=[5−43].X = \begin{bmatrix} x \\ y \\ z \end{bmatrix},\quad B = \begin{bmatrix} 5 \\ -4 \\ 3 \end{bmatrix}.

    AA is 3×33\times3⁠, XX is 3×13\times1⁠, so AXAX is defined and 3×13\times1⁠, the order of BB⁠:

    AX=[2x+3y+3zx−2y+z3x−y−2z].AX = \begin{bmatrix} 2x + 3y + 3z \\ x - 2y + z \\ 3x - y - 2z \end{bmatrix}.
    Multiplying out confirms that each row of AA carries the coefficients of one equation, with signs. (The book prints the first equation as "2x+3y+3 z=52x + 3y +3\,z = 5"; the spacing is only typographical, the coefficient of zz is 3.)
    Section 4.6.1 (matrix form); Section 3.4.5 (row times column). Lesson: solving systems AX = B
  2. Find all nine minors and cofactors

    Row 1 (entries 2,3,32, 3, 3⁠):

    M11=∣−21−1−2∣=(−2)(−2)−(1)(−1)=5,A11=(−1)1+1(5)=5,M12=∣113−2∣=(1)(−2)−(1)(3)=−5,A12=(−1)1+2(−5)=5,M13=∣1−23−1∣=(1)(−1)−(−2)(3)=5,A13=(−1)1+3(5)=5.\begin{aligned} M_{11} &= \begin{vmatrix} -2 & 1 \\ -1 & -2 \end{vmatrix}\\ &= (-2)(-2) - (1)(-1) = 5,\\ A_{11} &= (-1)^{1+1}(5) = 5,\\ M_{12} &= \begin{vmatrix} 1 & 1 \\ 3 & -2 \end{vmatrix}\\ &= (1)(-2) - (1)(3) = -5,\\ A_{12} &= (-1)^{1+2}(-5) = 5,\\ M_{13} &= \begin{vmatrix} 1 & -2 \\ 3 & -1 \end{vmatrix}\\ &= (1)(-1) - (-2)(3) = 5,\\ A_{13} &= (-1)^{1+3}(5) = 5. \end{aligned}

    Row 2 (entries 1,−2,11, -2, 1⁠):

    M21=∣33−1−2∣=(3)(−2)−(3)(−1)=−3,A21=(−1)2+1(−3)=3,M22=∣233−2∣=(2)(−2)−(3)(3)=−13,A22=(−1)2+2(−13)=−13,M23=∣233−1∣=(2)(−1)−(3)(3)=−11,A23=(−1)2+3(−11)=11.\begin{aligned} M_{21} &= \begin{vmatrix} 3 & 3 \\ -1 & -2 \end{vmatrix}\\ &= (3)(-2) - (3)(-1) = -3,\\ A_{21} &= (-1)^{2+1}(-3) = 3,\\ M_{22} &= \begin{vmatrix} 2 & 3 \\ 3 & -2 \end{vmatrix}\\ &= (2)(-2) - (3)(3) = -13,\\ A_{22} &= (-1)^{2+2}(-13) = -13,\\ M_{23} &= \begin{vmatrix} 2 & 3 \\ 3 & -1 \end{vmatrix}\\ &= (2)(-1) - (3)(3) = -11,\\ A_{23} &= (-1)^{2+3}(-11) = 11. \end{aligned}

    Row 3 (entries 3,−1,−23, -1, -2⁠):

    M31=∣33−21∣=(3)(1)−(3)(−2)=9,A31=(−1)3+1(9)=9,M32=∣2311∣=(2)(1)−(3)(1)=−1,A32=(−1)3+2(−1)=1,M33=∣231−2∣=(2)(−2)−(3)(1)=−7,A33=(−1)3+3(−7)=−7.\begin{aligned} M_{31} &= \begin{vmatrix} 3 & 3 \\ -2 & 1 \end{vmatrix}\\ &= (3)(1) - (3)(-2) = 9,\\ A_{31} &= (-1)^{3+1}(9) = 9,\\ M_{32} &= \begin{vmatrix} 2 & 3 \\ 1 & 1 \end{vmatrix}\\ &= (2)(1) - (3)(1) = -1,\\ A_{32} &= (-1)^{3+2}(-1) = 1,\\ M_{33} &= \begin{vmatrix} 2 & 3 \\ 1 & -2 \end{vmatrix}\\ &= (2)(-2) - (3)(1) = -7,\\ A_{33} &= (-1)^{3+3}(-7) = -7. \end{aligned}
    We find the cofactors first this time, because adj⁡A\operatorname{adj} A needs all nine anyway and ∣A∣|A| can then be read off from any row. In each minor the four surviving entries keep their places: for M21M_{21}⁠, deleting row 2 and column 1 leaves 3,33, 3 (from row 1) above −1,−2-1, -2 (from row 3).
    Definitions 1 and 2, Section 4.4. Lesson: minors and cofactors
  3. Compute ∣A∣|A| by expanding along row 2

    Row 2 is (1,−2,1)(1, -2, 1)⁠, with signs − + −-\,+\,-⁠:

    ∣A∣=−1∣33−1−2∣+(−2)∣233−2∣−1∣233−1∣=−1(−3)+(−2)(−13)−1(−11)=3+26+11=40.\begin{aligned} |A| &= -1\begin{vmatrix} 3 & 3 \\ -1 & -2 \end{vmatrix} + (-2)\begin{vmatrix} 2 & 3 \\ 3 & -2 \end{vmatrix}\\ &\qquad - 1\begin{vmatrix} 2 & 3 \\ 3 & -1 \end{vmatrix}\\ &= -1(-3) + (-2)(-13) - 1(-11)\\ &= 3 + 26 + 11 = 40. \end{aligned}

    Equivalently, with the cofactors of Step 2,

    ∣A∣=a21A21+a22A22+a23A23=1(3)+(−2)(−13)+1(11)=40.\begin{aligned} |A| &= a_{21}A_{21} + a_{22}A_{22} + a_{23}A_{23}\\ &= 1(3) + (-2)(-13) + 1(11) = 40. \end{aligned}

    So ∣A∣=40≠0|A| = 40 \ne 0⁠: AA is nonsingular, and the system has a unique solution.

    The value of a determinant does not depend on which row or column we expand along. Row 2 has the smallest entries, so the products are easiest. The signs − + −-\,+\,- come from (−1)2+1(-1)^{2+1}⁠, (−1)2+2(-1)^{2+2}⁠, (−1)2+3(-1)^{2+3}⁠.
    Section 4.2.3 (six ways, same value); the Remark in Section 4.4 (Δ\Delta = sum of the entries of any row times their cofactors); Section 4.6.1, Case I. Lesson: expanding a 3 × 3 determinant
  4. Build adj⁡A\operatorname{adj} A and A−1A^{-1}

    Matrix of cofactors:

    [5553−131191−7]\begin{bmatrix} 5 & 5 & 5 \\ 3 & -13 & 11 \\ 9 & 1 & -7 \end{bmatrix}

    Transpose for the adjoint, divide by ∣A∣=40|A| = 40 for the inverse:

    adj⁡A=[5395−131511−7],\operatorname{adj} A = \begin{bmatrix} 5 & 3 & 9 \\ 5 & -13 & 1 \\ 5 & 11 & -7 \end{bmatrix}, A−1=140[5395−131511−7].A^{-1} = \frac{1}{40}\begin{bmatrix} 5 & 3 & 9 \\ 5 & -13 & 1 \\ 5 & 11 & -7 \end{bmatrix}.
    The row of cofactors 5,5,55, 5, 5 becomes the first column of the adjoint. A quick test that the transpose was done: position (1,2)(1, 2) of adj⁡A\operatorname{adj} A must be A21=3A_{21} = 3⁠, not A12=5A_{12} = 5⁠.
    Definition 3, Section 4.5.1; Theorem 4, Section 4.5. Lesson: the adjoint
  5. Check: A(adj⁡A)=40 IA(\operatorname{adj} A) = 40\,I

    (1,1): 2(5)+3(5)+3(5)=10+15+15=40,(1,2): 2(3)+3(−13)+3(11)=6−39+33=0,(1,3): 2(9)+3(1)+3(−7)=18+3−21=0,(2,1): 1(5)+(−2)(5)+1(5)=5−10+5=0,(2,2): 1(3)+(−2)(−13)+1(11)=3+26+11=40,(2,3): 1(9)+(−2)(1)+1(−7)=9−2−7=0,(3,1): 3(5)+(−1)(5)+(−2)(5)=15−5−10=0,(3,2): 3(3)+(−1)(−13)+(−2)(11)=9+13−22=0,(3,3): 3(9)+(−1)(1)+(−2)(−7)=27−1+14=40.\begin{aligned} (1,1)&:\ 2(5) + 3(5) + 3(5)\\ &= 10 + 15 + 15 = 40,\\ (1,2)&:\ 2(3) + 3(-13) + 3(11)\\ &= 6 - 39 + 33 = 0,\\ (1,3)&:\ 2(9) + 3(1) + 3(-7)\\ &= 18 + 3 - 21 = 0,\\ (2,1)&:\ 1(5) + (-2)(5) + 1(5)\\ &= 5 - 10 + 5 = 0,\\ (2,2)&:\ 1(3) + (-2)(-13) + 1(11)\\ &= 3 + 26 + 11 = 40,\\ (2,3)&:\ 1(9) + (-2)(1) + 1(-7)\\ &= 9 - 2 - 7 = 0,\\ (3,1)&:\ 3(5) + (-1)(5) + (-2)(5)\\ &= 15 - 5 - 10 = 0,\\ (3,2)&:\ 3(3) + (-1)(-13) + (-2)(11)\\ &= 9 + 13 - 22 = 0,\\ (3,3)&:\ 3(9) + (-1)(1) + (-2)(-7)\\ &= 27 - 1 + 14 = 40. \end{aligned} A(adj⁡A)=[400004000040]=40 I,A(\operatorname{adj} A) = \begin{bmatrix} 40 & 0 & 0 \\ 0 & 40 & 0 \\ 0 & 0 & 40 \end{bmatrix} = 40\,I,

    so AA−1=140(40 I)=IAA^{-1} = \frac{1}{40}(40\,I) = I⁠.

    Diagonal entries: a row times its own cofactors gives ∣A∣|A|⁠. Off-diagonal entries: a row times another row's cofactors gives 0. Every cofactor has been used in at least three of these products, so they are all confirmed.
    Theorem 1, Section 4.5; Note in Section 4.4. Basics: why the inverse divides by |A|
  6. Compute X=A−1BX = A^{-1}B

    A−1A^{-1} is 3×33\times3 and BB is 3×13\times1⁠, so the product is 3×13\times1⁠. First (adj⁡A)B(\operatorname{adj} A)B⁠:

    row 1: 5(5)+3(−4)+9(3)=25−12+27=40,row 2: 5(5)+(−13)(−4)+1(3)=25+52+3=80,row 3: 5(5)+11(−4)+(−7)(3)=25−44−21=−40.\begin{aligned} \text{row 1}&:\ 5(5) + 3(-4) + 9(3)\\ &= 25 - 12 + 27 = 40,\\ \text{row 2}&:\ 5(5) + (-13)(-4) + 1(3)\\ &= 25 + 52 + 3 = 80,\\ \text{row 3}&:\ 5(5) + 11(-4) + (-7)(3)\\ &= 25 - 44 - 21 = -40. \end{aligned} X=[xyz]=140[4080−40]=[12−1].X = \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \frac{1}{40}\begin{bmatrix} 40 \\ 80 \\ -40 \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\ -1 \end{bmatrix}.

    So x=1x = 1⁠, y=2y = 2⁠, z=−1z = -1.

    From AX=BAX = B⁠, multiplying on the left by A−1A^{-1} and using A−1A=IA^{-1}A = I gives X=A−1BX = A^{-1}B⁠: there is no other solution. Step 7 confirms that this one satisfies the equations.
    Section 4.6.1, Case I. Lesson: inverse of a matrix
  7. Check in all three original equations

    2x+3y+3z=2(1)+3(2)+3(−1)=2+6−3=5,x−2y+z=1−2(2)+(−1)=−4,3x−y−2z=3(1)−2−2(−1)=3.\begin{aligned} 2x + 3y + 3z &= 2(1) + 3(2) + 3(-1)\\ &= 2 + 6 - 3 = 5,\\ x - 2y + z &= 1 - 2(2) + (-1) = -4,\\ 3x - y - 2z &= 3(1) - 2 - 2(-1) = 3. \end{aligned}

    All three hold.

    Only a check in every original equation proves that the computed numbers are a solution of the system as printed.
Result

∣A∣=40≠0|A| = 40 \ne 0⁠, and

A−1=140[5395−131511−7].A^{-1} = \frac{1}{40}\begin{bmatrix} 5 & 3 & 9 \\ 5 & -13 & 1 \\ 5 & 11 & -7 \end{bmatrix}.

The unique solution is x=1x = 1⁠, y=2y = 2⁠, z=−1z = -1.

(Textbook answer: x=1x = 1⁠, y=2y = 2⁠, z=−1z = -1⁠.)

Check it with numbers

∣A∣|A| along row 1. 2(5)+3(5)+3(5)=10+15+15=402(5) + 3(5) + 3(5) = 10 + 15 + 15 = 40⁠, the same as along row 2.

By substitution. The second equation gives x=−4+2y−zx = -4 + 2y - z⁠. Putting this into the first: −8+7y+z=5-8 + 7y + z = 5⁠, so 7y+z=137y + z = 13⁠. Into the third: −12+5y−5z=3-12 + 5y - 5z = 3⁠, so y−z=3y - z = 3⁠. Adding these two, 8y=168y = 16⁠, so y=2y = 2⁠, then z=−1z = -1 and x=−4+4+1=1x = -4 + 4 + 1 = 1⁠. The same answer.

Common mistakes
  1. Starting row 2 with a plus sign. The signs for row 2 are − + −-\,+\,-⁠. Using + − ++\,-\,+ gives −3−26−11=−40-3 - 26 - 11 = -40⁠, the right size but the wrong sign, and then every entry of XX comes out with the wrong sign.
  2. Mixing up A12A_{12} and A21A_{21} in the adjoint. Here A12=5A_{12} = 5 and A21=3A_{21} = 3⁠, so a missed transpose changes the answer.
  3. Arithmetic with negative products. (−13)(−4)=+52(-13)(-4) = +52⁠; a sign slip here changes yy⁠.
What to take away
  1. You may expand along any row or column; choose the one with the smallest entries or the most zeros, and use its own sign pattern.
  2. Once all nine cofactors are known, ∣A∣|A| is free: any row of AA times its row of cofactors.
  3. The check A(adj⁡A)=∣A∣ IA(\operatorname{adj} A) = |A|\,I and the check in the original equations catch different mistakes; do both.

Every fact used, and where it comes from

FactUsed inSource
A system written as AX=BAX = BStep 1Section 4.6.1 (Lesson: solving systems)
Matrix product, row times columnSteps 1, 5, 6Section 3.4.5 (Chapter 3)
Minor and cofactorStep 2Definitions 1 and 2, Section 4.4 (Lesson: minors and cofactors)
Expansion along any row; Δ=\Delta = row times its cofactorsStep 3Section 4.2.3; Remark in Section 4.4 (Lesson: expanding a 3 × 3 determinant)
adj⁡A\operatorname{adj} A = transpose of [Aij][A_{ij}]Step 4Definition 3, Section 4.5.1 (Lesson: the adjoint)
A(adj⁡A)=∣A∣ IA(\operatorname{adj} A) = |A|\,IStep 5Theorem 1, Section 4.5; Note in Section 4.4
A−1=1∣A∣adj⁡AA^{-1} = \frac{1}{|A|}\operatorname{adj} A when ∣A∣≠0|A| \ne 0Step 4Theorem 4, Section 4.5 (Lesson: inverse of a matrix)
X=A−1BX = A^{-1}B is the unique solutionSteps 3, 6Section 4.6.1, Case I
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →