This matrix calculator adds, subtracts and multiplies 2 × 2 and 3 × 3 matrices, finds the transpose and the determinant, and finds the inverse by the adjoint method. Every answer comes with the full working in exact fractions, set out the way it is done in Class 12 Maths (NCERT Chapter 3 Matrices and Chapter 4 Determinants), so you can check your own solution line by line.
How the calculator works
1. Addition and subtraction
Two matrices can be added or subtracted only when they have the same order. Add (or subtract) the elements that are in the same position:
(A + B)ij = aij + bij and (A − B)ij = aij − bij
2. Multiplication
AB is defined when the number of columns of A equals the number of rows of B. The element in row i and column j of AB is found by multiplying row i of A with column j of B, element by element, and adding:
cij = ai1b1j + ai2b2j + ai3b3j
In general AB and BA are not equal, which is why the calculator gives both choices.
3. Transpose
The transpose A′ (or AT) is made by writing the rows of A as columns. If A′ = A the matrix is symmetric; if A′ = −A it is skew symmetric. The calculator tells you when either is true.
4. Determinant
For a 2 × 2 matrix: |A| = a11a22 − a12a21
For a 3 × 3 matrix, expanding along the first row:
|A| = a11(a22a33 − a23a32) − a12(a21a33 − a23a31) + a13(a21a32 − a22a31)
Note the signs +, −, + across the first row.
5. Inverse by the adjoint method
- Find |A|. If |A| = 0 the matrix is singular and has no inverse.
- Find the minor Mij of every element (the determinant left after deleting row i and column j) and its cofactor Aij = (−1)i+j Mij.
- adj A = transpose of the matrix of cofactors.
- A−1 = (1 ÷ |A|) × adj A
- Check: A × A−1 should give the identity matrix I.
Worked example
Question: Find the inverse of A = [2 −1 3; 1 0 2; 4 1 −1] (rows separated by semicolons).
Step 1. |A| = 2(0 × (−1) − 2 × 1) − (−1)(1 × (−1) − 2 × 4) + 3(1 × 1 − 0 × 4) = 2(−2) + 1(−9) + 3(1) = −4 − 9 + 3 = −10. Since |A| ≠ 0, A−1 exists.
Step 2. Cofactors:
- A11 = −2, A12 = 9, A13 = 1
- A21 = 2, A22 = −14, A23 = −6
- A31 = −2, A32 = −1, A33 = 1
For example, M12 = 1 × (−1) − 2 × 4 = −9, so A12 = (−1)1+2 × (−9) = 9.
Step 3. Write the cofactors of row 1 as column 1, and so on: adj A = [−2 2 −2; 9 −14 −1; 1 −6 1].
Step 4. A−1 = (1 ÷ (−10)) × adj A = [1/5 −1/5 1/5; −9/10 7/5 1/10; −1/10 3/5 −1/10].
Multiplying A by this matrix gives the identity matrix, so the answer is correct. This is the example already filled in the calculator above, where you can see every minor written out.
Common mistakes
- Forgetting the sign pattern of cofactors (+ − +, − + −, + − +), especially the minus sign in front of a12 when expanding a determinant.
- Using the matrix of cofactors itself as adj A. The adjoint is its transpose.
- Not checking |A| first. If |A| = 0 there is no inverse, so stop there.
- Multiplying matrices element by element. Each element of AB is a row of A times a column of B, added up.
- Assuming AB = BA. Matrix multiplication is usually not commutative.
Practise with
- NCERT Solutions Class 12 Mathematics Chapter 3 Matrices
- NCERT Exemplar Solutions Class 12 Mathematics Chapter 4 Determinants
- Xam Idea Solutions Class 12 Maths Adjoint and Inverse of a Matrix
- CBSE Class 12 Mathematics Matrices and Determinants Worksheet
All answers are exact fractions in lowest terms. Decimals you type are changed to fractions (0.25 becomes 1/4).