On this page
Matrices have no division, so you cannot "divide by A". You undo A by multiplying with its inverse, and the side you multiply on decides whether your answer is right.
Why does the side matter when you find X?
The NCERT Class 12 Mathematics textbook works through examples where AB and BA come out different, and concludes that "matrix multiplication is not commutative" (NCERT, Matrices, p. 53). So A⁻¹B and BA⁻¹ are usually different matrices, and only one of them solves your equation.
The rule: put A⁻¹ on the same side as A, on both sides of the equation.
AX = B: pre-multiply. A⁻¹AX = A⁻¹B, so X = A⁻¹B.
XA = B: post-multiply. XAA⁻¹ = BA⁻¹, so X = BA⁻¹.
NCERT's matrix method uses exactly this step, "premultiplying by A⁻¹" to reach X = A⁻¹B (NCERT, Determinants, p. 94).
How do you find X from AX = B using the inverse?
A square matrix is invertible if and only if it is non-singular, meaning |A| ≠ 0 (NCERT, Determinants, Theorem 4, p. 90).
Worked example. Take A = [2 1; 5 3] and B = [1 2; 3 4], where a semicolon starts a new row.
Check the determinant: |A| = 2(3) − 1(5) = 1. Not zero, so A⁻¹ exists.
For a 2×2 matrix, swap the diagonal entries, change the signs of the other two, and divide by |A|: A⁻¹ = [3 −1; −5 2].
Pre-multiply: X = A⁻¹B = [3 −1; −5 2][1 2; 3 4] = [0 2; 1 −2].
Check: AX = [2 1; 5 3][0 2; 1 −2] = [1 2; 3 4] = B.
Now keep the same A and B, but make the equation XA = B.
Post-multiply: X = BA⁻¹ = [1 2; 3 4][3 −1; −5 2] = [−7 3; −11 5].
Check: XA = [−7 3; −11 5][2 1; 5 3] = [1 2; 3 4] = B.
Same A, same B, two different answers. If you had used A⁻¹B for XA = B, the check would catch it: [0 2; 1 −2][2 1; 5 3] = [10 6; −8 −5], which is not B.
For a 3×3 matrix, use the adjoint or find the inverse with elementary row operations. Some questions hand you a shortcut, as in using A² − 5A + 7I = O to find A⁻¹.
What if A has no inverse?
A singular matrix (|A| = 0) has no inverse, and NCERT notes that "a rectangular matrix does not possess inverse matrix" (NCERT, Matrices, p. 69).
Instead, write X with unknown entries, multiply out, and set corresponding entries equal. NCERT's Example 25 finds an unknown matrix D from CD − AB = O this way (NCERT, Matrices, pp. 71-72).
Worked example. Question 8 of NCERT's Miscellaneous Exercise on Chapter 3 asks for X such that X[1 2 3; 4 5 6] = [−7 −8 −9; 2 4 6] (NCERT, Matrices, p. 73). The known matrix is 2×3, so it has no inverse.
Find the order of X. The product of an m × n matrix and an n × p matrix is m × p (NCERT, Matrices, p. 51). So X is 2×2.
Let X = [a b; c d]. The first row of the product is [a + 4b, 2a + 5b, 3a + 6b].
Match it with [−7 −8 −9]: a + 4b = −7 and 2a + 5b = −8. Solving gives b = −2 and a = 1.
Use the third entry as a check: 3(1) + 6(−2) = −9. It fits.
The second row gives c + 4d = 2 and 2c + 5d = 4, so d = 0 and c = 2. Check: 3(2) + 6(0) = 6.
So X = [1 −2; 2 0].
The spare equations are a built-in check: if one fails, you slipped, or no such X exists.
Which method should you use?
A square, |A| ≠ 0: use the inverse.
A singular or rectangular: use unknown entries. There may be one X, many, or none.
An MCQ with options: multiply each option into the equation.
Whichever you use, check by multiplying X back in the original order: A times X for AX = B, X times A for XA = B.
If you keep writing BA⁻¹ when the question needs A⁻¹B, practise similar questions in the Fermi Problem Library, where the step-by-step solver explains the reasoning rather than printing an answer. If inverses or determinants themselves feel shaky, the Fermi Concept Library gives each mathematics concept its own lesson.
Try it now: solve XA = B with A = [1 2; 3 5] and B = [1 1; 0 1], then multiply your X back in to check. You should get X = [−2 1; 3 −1].



