Solve system of equations: x + y + z = 6, x - y + z = 2, 2x + y - z = 1 using matrices

medium CBSE JEE-MAIN CBSE 2024 4 min read

Question

Solve the system of equations using matrices (Cramer’s rule or inverse method):

x+y+z=6x + y + z = 6 xy+z=2x - y + z = 2 2x+yz=12x + y - z = 1

(CBSE 2024)


Solution — Step by Step

A=(111111211),X=(xyz),B=(621)A = \begin{pmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 2 & 1 & -1 \end{pmatrix}, \quad X = \begin{pmatrix} x \\ y \\ z \end{pmatrix}, \quad B = \begin{pmatrix} 6 \\ 2 \\ 1 \end{pmatrix}

Expand along the first row:

A=1(11)1(12)+1(1+2)|A| = 1(1 - 1) - 1(-1 - 2) + 1(1 + 2) =1(0)1(3)+1(3)=0+3+3=6= 1(0) - 1(-3) + 1(3) = 0 + 3 + 3 = 6

Since A=60|A| = 6 \neq 0, a unique solution exists.

Cofactor matrix:

C11=0C_{11} = 0, C12=3C_{12} = 3, C13=3C_{13} = 3

C21=2C_{21} = 2, C22=3C_{22} = -3, C23=1C_{23} = 1

C31=2C_{31} = 2, C32=0C_{32} = 0, C33=2C_{33} = -2

adj(A)=(022330312)\text{adj}(A) = \begin{pmatrix} 0 & 2 & 2 \\ 3 & -3 & 0 \\ 3 & 1 & -2 \end{pmatrix}

(transpose of the cofactor matrix)

A1=1Aadj(A)=16(022330312)A^{-1} = \frac{1}{|A|} \text{adj}(A) = \frac{1}{6}\begin{pmatrix} 0 & 2 & 2 \\ 3 & -3 & 0 \\ 3 & 1 & -2 \end{pmatrix} X=A1B=16(022330312)(621)X = A^{-1}B = \frac{1}{6}\begin{pmatrix} 0 & 2 & 2 \\ 3 & -3 & 0 \\ 3 & 1 & -2 \end{pmatrix}\begin{pmatrix} 6 \\ 2 \\ 1 \end{pmatrix} =16(0+4+2186+018+22)=16(61218)=(123)= \frac{1}{6}\begin{pmatrix} 0 + 4 + 2 \\ 18 - 6 + 0 \\ 18 + 2 - 2 \end{pmatrix} = \frac{1}{6}\begin{pmatrix} 6 \\ 12 \\ 18 \end{pmatrix} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}

Solution: x=1,y=2,z=3x = 1, y = 2, z = 3

Verify: 1+2+3=61 + 2 + 3 = 6 ✓, 12+3=21 - 2 + 3 = 2 ✓, 2+23=12 + 2 - 3 = 1


Why This Works

The matrix equation AX=BAX = B is the compact form of a linear system. If AA is invertible (A0|A| \neq 0), we can multiply both sides by A1A^{-1} to get X=A1BX = A^{-1}B — the unique solution.

The adjoint method computes A1=1Aadj(A)A^{-1} = \frac{1}{|A|}\text{adj}(A), where adj(A)\text{adj}(A) is the transpose of the cofactor matrix. Each cofactor is a 2×22 \times 2 determinant with appropriate sign.

If A=0|A| = 0, the system either has no solution or infinitely many solutions — the matrix method alone can’t distinguish these cases (you’d need to check the augmented matrix).


Alternative Method — Cramer’s Rule

x=DxD,y=DyD,z=DzDx = \frac{D_x}{D}, \quad y = \frac{D_y}{D}, \quad z = \frac{D_z}{D}

where D=A=6D = |A| = 6, and Dx,Dy,DzD_x, D_y, D_z are obtained by replacing the respective column of AA with BB.

Dx=611211111=6(0)1(3)+1(3)=6D_x = \begin{vmatrix} 6 & 1 & 1 \\ 2 & -1 & 1 \\ 1 & 1 & -1 \end{vmatrix} = 6(0) - 1(-3) + 1(3) = 6, so x=6/6=1x = 6/6 = 1.

For CBSE boards, the inverse matrix method is preferred (more marks for showing the adjoint). For JEE, Cramer’s rule is faster for 3-variable systems. In either case, always verify the solution by substituting back into ALL three equations — CBSE marking scheme awards marks for verification.


Common Mistake

The most common error in the cofactor method: forgetting to transpose the cofactor matrix to get the adjoint. The cofactor matrix and the adjoint are NOT the same — adj(A)=CT\text{adj}(A) = C^T. Another frequent mistake is getting signs wrong in cofactors — remember the checkerboard sign pattern: +,,++, -, + / ,+,-, +, - / +,,++, -, +.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next