Solution of linear equations using matrices

Two or three linear equations, solved not by elimination but by one clean matrix computation. Every system such as a1x+b1y+c1z=d1a_1x+b_1y+c_1z=d_1, a2x+b2y+c2z=d2a_2x+b_2y+c_2z=d_2, a3x+b3y+c3z=d3a_3x+b_3y+c_3z=d_3 collapses into a single matrix sentence AX=BAX = B, where AA holds the coefficients, XX the unknowns, and BB the constants. If AA is non-singular — that is, ∣A∣≠0|A| \neq 0 — then A−1A^{-1} exists, and the whole system is solved in one stroke by X=A−1BX = A^{-1}B. This is the payoff of the entire Determinants chapter: adjoints and inverses, built up equation by equation, finally do real work. It is also a strict inverse-matrix method — CBSE's chosen technique, not Cramer's rule — and it teaches you to read the fate of a system (unique solution, no solution, or infinitely many) straight off ∣A∣|A|, before you compute anything else.

The core insight

A linear system AX=BAX=B has the unique solution X=A−1BX=A^{-1}B whenever ∣A∣≠0|A|\neq 0, and the sign of ∣A∣|A| together with (adj⁡A)B(\operatorname{adj}A)B tells you instantly whether the system is consistent, inconsistent, or has infinitely many solutions.

The core idea

Packing the system into one equation. Any system of 2 or 3 linear equations can be written as three separate matrices multiplied together:

AX=BAX = B

where: AA is the n×nn\times n coefficient matrix (n=2n=2 or 33), XX is the column matrix of unknowns, and BB is the column matrix of constants on the right-hand side. Writing the system this way is purely bookkeeping — no new mathematics — but it turns "solve for x,y,zx, y, z" into "solve for XX," a problem matrix algebra already knows how to handle.

Solving by inverting AA. If AA is invertible, multiply both sides of AX=BAX = B on the left by A−1A^{-1}. Since A−1A=IA^{-1}A = I and IX=XIX = X, the unknowns fall out directly:

X=A−1BX = A^{-1}B

where: A−1=1∣A∣adj⁡(A)A^{-1} = \dfrac{1}{|A|}\operatorname{adj}(A), so this step reuses the adjoint-and-determinant machinery from earlier in the chapter — nothing new is computed here that you have not already practised. The condition for this to work is simply ∣A∣≠0|A| \neq 0, so AA is non-singular and A−1A^{-1} exists.

Reading the outcome from ∣A∣|A| alone. Before grinding through an inverse, a quick glance at ∣A∣|A| tells you which of three outcomes you are in. This is the syllabus's basic-level consistency check, and it is exactly what the figure below sorts through.

Figure
A decision flow starting from the determinant of A and branching into a unique solution, infinitely many solutions, or no solution
Reading the system's fate from the determinant of A compute det A det A not 0 det A = 0 unique solution X = A inverse times B check adj A times B equals zero matrix not zero infinitely many solutions no solution CBSE Class 12 focuses on the unique-solution branch: X = A inverse B

Solving X = A inverse B

The system's fate depends entirely on two matrix quantities computed from AA and BB: the determinant ∣A∣|A|, and the product (adj⁡A)B(\operatorname{adj}A)B when ∣A∣=0|A|=0. Getting from a raw system of equations to a verified numeric answer for xx, yy, zz requires converting the equations to AX=BAX=B form correctly, confirming ∣A∣≠0|A|\neq0, computing the adjoint, forming A−1A^{-1}, and multiplying it into BB in the correct order — a chain where a slip at any link gives a wrong final answer even if every individual computation looks right in isolation.

Step 1. Write the given system as AX=BAX = B by reading off the coefficients of xx, yy (and zz, if present) row by row into AA, stacking the unknowns into XX, and the right-hand-side constants into BB. Any missing variable in an equation must be entered as coefficient 00 in AA, not left out — a row must have one entry per unknown.

Step 2. Compute ∣A∣|A| using the standard expansion along any convenient row or column (a row or column with a zero is usually fastest). If ∣A∣≠0|A| \neq 0, the system has a unique solution and you proceed; if ∣A∣=0|A| = 0, stop and instead inspect (adj⁡A)B(\operatorname{adj}A)B to decide between "infinitely many solutions" and "no solution," rather than attempting an inverse that does not exist.

Step 3. Compute adj⁡(A)\operatorname{adj}(A): for 2×22\times2, swap the diagonal entries and negate the off-diagonal pair; for 3×33\times3, compute all nine cofactors CijC_{ij}, arrange them into the matrix [Cij][C_{ij}], and transpose it.

Step 4. Form A−1=1∣A∣adj⁡(A)A^{-1} = \dfrac{1}{|A|}\operatorname{adj}(A), then compute X=A−1BX = A^{-1}B by multiplying this matrix into the column BB — always A−1A^{-1} times BB, in that order, since matrix multiplication is not commutative.

Step 5. Read off xx, yy, zz from the resulting column XX, and verify by substituting each value back into all of the original equations.

Worked example

Solve 2x+y=52x + y = 5 and 3x+2y=83x + 2y = 8 by the matrix inverse method, then check what the method predicts if the right-hand side were changed to a case with ∣A∣=0|A| = 0.

Step 1. Write AX=BAX = B: A=[2132]A = \begin{bmatrix} 2 & 1 \\ 3 & 2 \end{bmatrix}, X=[xy]X = \begin{bmatrix} x \\ y \end{bmatrix}, B=[58]B = \begin{bmatrix} 5 \\ 8 \end{bmatrix}.

Step 2. Compute ∣A∣=(2)(2)−(1)(3)=4−3=1|A| = (2)(2) - (1)(3) = 4 - 3 = 1. Since ∣A∣≠0|A| \neq 0, a unique solution exists and the inverse method applies directly.

Step 3. Using the 2×22\times2 shortcut, adj⁡(A)=[2−1−32]\operatorname{adj}(A) = \begin{bmatrix} 2 & -1 \\ -3 & 2 \end{bmatrix}, so A−1=11[2−1−32]=[2−1−32]A^{-1} = \dfrac{1}{1}\begin{bmatrix} 2 & -1 \\ -3 & 2 \end{bmatrix} = \begin{bmatrix} 2 & -1 \\ -3 & 2 \end{bmatrix}.

Step 4. Compute X=A−1B=[2−1−32][58]=[2(5)−1(8)−3(5)+2(8)]=[21]X = A^{-1}B = \begin{bmatrix} 2 & -1 \\ -3 & 2 \end{bmatrix}\begin{bmatrix} 5 \\ 8 \end{bmatrix} = \begin{bmatrix} 2(5)-1(8) \\ -3(5)+2(8) \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}. So x=2x = 2, y=1y = 1, and checking, 2(2)+1=52(2)+1=5 and 3(2)+2(1)=83(2)+2(1)=8, both correct.

Competitive stretch

Now consider the related pair 2x+y=52x + y = 5 and 4x+2y=84x + 2y = 8. Here A′=[2142]A' = \begin{bmatrix} 2 & 1 \\ 4 & 2 \end{bmatrix} has ∣A′∣=(2)(2)−(1)(4)=0|A'| = (2)(2)-(1)(4) = 0, so A′A' is singular and X=A′−1BX = A'^{-1}B cannot be formed at all — the method does not silently give a wrong answer; it simply refuses to run, which is itself the diagnostic. The first pair has the unique solution x=2,y=1x=2, y=1; the second pair fails the ∣A∣≠0|A|\neq0 test and needs the adj⁡(A)B\operatorname{adj}(A)B inspection instead.

Common traps

  • Reaching for Cramer's rule instead of X=A−1BX = A^{-1}B — CBSE's chosen technique for this chapter is the inverse-matrix method, so practise it fluently even if you already know Cramer's rule.
  • Writing down X=A−1BX = A^{-1}B before checking ∣A∣≠0|A| \neq 0 — the formula is meaningless if A−1A^{-1} does not exist.
  • Multiplying in the wrong order, computing B⋅adj⁡(A)B \cdot \operatorname{adj}(A) instead of adj⁡(A)⋅B\operatorname{adj}(A) \cdot B — matrix multiplication is not commutative, and only the stated order has matching dimensions.
  • Dropping a missing variable's term instead of entering it as coefficient 00 in AA — this silently changes the matrix and gives a wrong XX.

Ask the tutor: Share your own system of 2 or 3 linear equations and have the tutor walk through the matrix setup, the determinant check, and the A−1BA^{-1}B computation with you step by step.

Why does CBSE insist on X = A inverse B instead of Cramer's rule, which I learned is faster?

Cramer's rule is a valid alternative for small systems, but it is not the technique this chapter builds toward — the whole point of the Determinants chapter is to develop the adjoint and the inverse, and the inverse-matrix method is where that machinery pays off. CBSE questions on this topic expect you to set up AX=BAX=B and solve via A−1A^{-1}, so that is the method to have automatic. You can mention Cramer's rule as a check, but do not substitute it as your primary working.

What if det A turns out to be zero halfway through my calculation?

Stop immediately — do not try to compute A−1A^{-1}, since it does not exist when ∣A∣=0|A|=0. Instead, compute adj⁡(A)⋅B\operatorname{adj}(A) \cdot B. If that product is the zero matrix, the system is consistent but has infinitely many solutions; if it is not the zero matrix, the system is inconsistent and has no solution. At this level you are only expected to recognise these two cases by inspection, not to describe the full solution set.

Do I have to compute the full adjoint every time, even for a 2 by 2 system?

For a 2×22\times2 matrix [abcd]\begin{bmatrix} a & b \\ c & d \end{bmatrix}, the adjoint is just [d−b−ca]\begin{bmatrix} d & -b \\ -c & a \end{bmatrix} — swap the diagonal entries and negate the off-diagonal ones, no cofactor expansion needed. For 3×33\times3 you do need the full nine-cofactor computation, arranging them into a matrix and transposing it, exactly as in the worked example's Step 3 pattern for larger systems.

Before this