A system of linear equations can be written as a single matrix equation AX=B, where A holds the coefficients, X the unknowns, and B the right-hand sides.
When A is square and ∣A∣=0, it has an inverse, and multiplying both sides by A−1 on the left solves the whole system at once. This is the matrix method:
AX=B⇒X=A−1B,A−1=∣A∣1adjA
Steps of the matrix method
Write the system as AX=B, keeping the variables in the same order in every row.
Find ∣A∣. If it is 0, stop and use the consistency test below instead.
Find adjA, the transpose of the matrix of cofactors.
Compute X=∣A∣1(adjA)B.
Substitute the answer back into one original equation to check.
Checking by elimination: subtracting the first equation from the second eliminates x and z at once:
(x+y+z)−(x−y+z)=2−4⇒2y=−2⇒y=−1
Substituting y=−1 into the second equation gives x+z=3. Substituting into the third gives 2x−3z=1. Using x=3−z:
2(3−z)−3z=1⇒6−5z=1⇒z=1⇒x=2
Both methods agree.
Consistency: one solution, none, or infinitely many
Consistency test for AX = B with a square matrix A
Condition
Result
∣A∣=0
Consistent, with exactly one solution X=A−1B
∣A∣=0 and (adjA)B=O
Inconsistent: no solution
∣A∣=0 and (adjA)B=O
Not decided by this test: infinitely many solutions or none, so check directly
Example: show that x+y=2 and 2x+2y=5 has no solution.
Solution:A=[1212], so ∣A∣=2−2=0. With adjA=[2−2−11]:
(adjA)B=[2−2−11][25]=[−11]=O
So the system is inconsistent. Geometrically the two equations are parallel lines. Change the second right-hand side to 4 and (adjA)B becomes O: the equations are then the same line, with infinitely many solutions.
Common mistakes
Multiplying in the wrong order. It's X=A−1B. Matrix multiplication isn't commutative, and BA−1 isn't even defined here.
Forgetting to transpose the cofactors.adjA is the transpose of the cofactor matrix. Skipping the transpose gives a wrong inverse whenever A isn't symmetric.
Mixing up variable order. If one equation is written z+x−y, rewrite it as x−y+z before building A, or the columns won't line up.
Reading (adjA)B=O as "infinitely many solutions". With ∣A∣=0 it can also mean no solution. The test only rules a system inconsistent when (adjA)B=O.
Where this comes up in exams
The 2025-26 CBSE Class XII syllabus lists the consistency, inconsistency and number of solutions of a system of linear equations, and solving systems in two or three variables using the inverse of a matrix. The JEE Main 2026 syllabus lists the test of consistency and the solution of simultaneous linear equations in two or three variables using matrices, and JEE Advanced 2026 lists solutions of simultaneous linear equations in two or three variables.
The matrix method only produces a unique solution when the coefficient matrix isn't singular, and checking that comes down to a basic square-matrix property.