Determinant Calculator
Exact determinants of 2x2 to 6x6 matrices by row reduction or cofactor expansion, with every step.
This matrix calculator online multiplies, adds and subtracts matrices up to 6 × 6 and finds the determinant, inverse, transpose, powers and trace, with steps in exact fractions.
A × B
[[-9, 7], [18, -12]]
A (2 × 3) times B (3 × 2) gives a 2 × 2 matrix. Each entry is a row of A times a column of B; for example, entry (1, 1) is −9.
Check the sizes
A is 2 × 3 and B is 3 × 2. The inner sizes match (3 = 3), so the product exists and has the outer sizes, 2 × 2.
Entry (1, 1): row 1 of A times column 1 of B
Multiply matching entries of the row and the column, then add the products.
Entry (1, 2): row 1 of A times column 2 of B
Entry (2, 1): row 2 of A times column 1 of B
Entry (2, 2): row 2 of A times column 2 of B
Result
Matrix product (row by column)
Plain-text formula: (AB)_(ij) = ∑_{k = 1}^n a_(ik)b_(kj)
Entry (i, j) of AB is row i of A times column j of B: multiply matching entries and add. An m × n matrix times an n × p matrix gives an m × p matrix, so the inner sizes must agree.
Sum, difference and scalar multiple
Plain-text formula: (A ± B)_(ij) = a_(ij) ± b_(ij), (kA)_(ij) = k a_(ij)
Addition and subtraction work entry by entry and need two matrices of the same size. A scalar multiplies every entry.
Transpose and trace
Plain-text formula: (A^T)_(ij) = a_(ji), tr(A) = a_11 + a_22 + ⋯ + a_(nn)
The transpose swaps rows and columns. The trace of a square matrix is the sum of its diagonal entries.
Determinant and inverse
Plain-text formula: det [a, b; c, d] = ad − bc, AA^(−1) = A^(−1)A = I
The determinant of a square matrix is a single number; for larger matrices the calculator finds it by row reduction. The inverse exists exactly when det A ≠ 0, and the calculator finds it by Gauss–Jordan elimination.
Integer powers
Plain-text formula: A^n = A · A⋯A;(n factors), A^0 = I, A^(−n) = (A^(−1))^n
Powers exist only for square matrices. Large powers are found by repeated squaring. Negative powers need the inverse, so they are undefined when det A = 0.
The size rule is the first thing to check. For a product, write the sizes side by side, (m × n)(n × p): the inner numbers must match and the outer numbers give the size of the result. A 2 × 3 matrix times a 3 × 2 matrix is 2 × 2, while the reverse order gives a 3 × 3 matrix.
Order matters in multiplication. In general AB ≠ BA, even when both products exist, so the calculator tells you whether your two square matrices happen to commute. Addition, by contrast, is commutative: A + B = B + A.
Results are exact. When an entry is a fraction, the decimal table underneath gives the same matrix to 10 significant digits for use in other software.
1. Check the sizes. Write them side by side, (m × n)(n × p). The two inner numbers must be equal; the outer numbers give the size of the answer.
2. Take row i of A and column j of B. Multiply the first entry of the row by the first entry of the column, the second by the second, and so on.
3. Add the products. The total is entry (i, j) of AB. Repeat for every row of A and every column of B.
For and , entry (1, 1) is and entry (2, 2) is , so . Load the 2 × 2 product example above to see all four entries: used as a matrix multiplication calculator, the tool shows the row-times-column sum for every entry whenever the product has at most nine entries, such as a 3 × 3 result. To multiply a matrix by a number instead, choose k · A: every entry is multiplied by k.
| A | B | Does A × B exist? | Size of AB |
|---|---|---|---|
| 2 × 2 | 2 × 2 | Yes | 2 × 2 |
| 2 × 3 | 3 × 2 | Yes | 2 × 2 |
| 3 × 2 | 2 × 3 | Yes | 3 × 3 |
| 2 × 2 | 2 × 1 | Yes (matrix times vector) | 2 × 1 |
| 3 × 3 | 3 × 3 | Yes | 3 × 3 |
| 2 × 3 | 2 × 3 | No: 3 columns but 2 rows | — |
A matrix acts on a vector by turning it into a new vector: mixes the components of using the rows of A. The product AB is the single matrix that does "first B, then A". That is why the order cannot be swapped freely, and why the columns of A must match the rows of B.
Multiplication is associative, so three matrices can be multiplied in either grouping: . Work out AB first, then multiply the result by C. Powers follow the same idea. If a matrix rotates the plane by 90°, its fourth power rotates by 360° and equals the identity, which you can check with the "Rotation to the 4th power" example.
Choose Determinant det(A) or Inverse A⁻¹ for a square matrix. The determinant is found by reducing A to triangular form and multiplying the diagonal; the inverse by Gauss–Jordan elimination, which row-reduces until the left half is the identity. If det A = 0, the matrix is singular and has no inverse.
For more detail, the determinant calculator adds cofactor expansion, the inverse matrix calculator adds the 2 × 2 shortcut and the adjugate method, and the RREF calculator runs Gauss–Jordan elimination on any matrix, including augmented matrices for solving .
Each operation has its own size rule. The table lists what each one needs and what it returns.
| Operation | Needs | Result |
|---|---|---|
| A + B, A − B | A and B the same size | Same size as A |
| A × B | Columns of A = rows of B | (rows of A) × (columns of B) |
| k · A | Any matrix and a number k | Same size as A |
| Transpose Aᵀ | Any matrix | m × n becomes n × m |
| Determinant, trace | Square matrix | A single number |
| Inverse A⁻¹ | Square matrix with det A ≠ 0 | Same size as A |
| Power Aⁿ | Square matrix (det A ≠ 0 if n < 0) | Same size as A |
TI-84 Plus: press 2nd then x⁻¹ to open MATRIX, go to EDIT, choose [A], set the size and type the entries; do the same for [B]. On the home screen insert [A] and [B] from the NAMES menu with × between them and press ENTER. Use x⁻¹ after [A] for the inverse, and det( from the MATH tab of the same MATRIX menu for the determinant.
Casio fx-991EX (ClassWiz): press MENU and choose Matrix, define MatA and MatB with their sizes (up to 4 × 4) and type the entries. Press AC, then use OPTN to insert MatA and MatB, type × between them and press =. A size mismatch gives Dimension ERROR.
Handheld calculators show only the answer. Use this page to see the working, or for 5 × 5 and 6 × 6 matrices. This calculator is for linear algebra; it is not a "Destiny Matrix" numerology chart.
Find AB for A = [[2, −1, 3], [0, 4, 1]] and B = [[1, 2], [5, −3], [−2, 0]].
Answer: , a 2 × 2 matrix with determinant . These are the default matrices, so the calculator above already shows this product with its steps.
Check that A has as many columns as B has rows. Then each entry (i, j) of AB is row i of A times column j of B: multiply matching entries and add. For example, [[1, 2], [3, 4]] × [[5, 6], [7, 8]] = [[19, 22], [43, 50]].
A × B exists only when A has as many columns as B has rows. A 2 × 3 matrix can multiply a 3 × 4 matrix, but not a 2 × 3 matrix. The calculator names the mismatch, for example "A has 3 columns but B has 2 rows".
Yes, as long as the inner sizes match. A 2 × 3 matrix times a 3 × 4 matrix gives a 2 × 4 matrix. Adding and subtracting are stricter: both matrices must have exactly the same size.
No. With A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]], AB = [[19, 22], [43, 50]] but BA = [[23, 34], [31, 46]]. Some pairs do commute, for example any matrix and the identity.
Multiply two at a time and keep the order: find AB, then multiply the result by C. Because multiplication is associative, (AB)C = A(BC), so either grouping gives the same answer.
A⁻ⁿ is the inverse of A raised to the power n. For A = [[2, 1], [1, 1]], the inverse is [[1, −1], [−1, 2]] and A⁻² = [[2, −3], [−3, 5]]. If det A = 0 there is no inverse, so negative powers are undefined.
No. A² = A × A needs the columns of A to match its rows, which only happens for square matrices. The same is true of the trace, the determinant and the inverse.
No. A decimal such as 0.1 is stored as the fraction 1/10, so sums and products are exact. A decimal table is added whenever the result contains fractions.
The trace is the sum of the diagonal entries and equals the sum of the eigenvalues. It satisfies tr(AB) = tr(BA), and it appears in the characteristic polynomial used by the eigenvalue calculator.
Exact determinants of 2x2 to 6x6 matrices by row reduction or cofactor expansion, with every step.
Exact inverses of 2x2 to 6x6 matrices by Gauss–Jordan elimination, with every row operation and a check.
Reduced row echelon form or REF with each row operation, rank, nullity and linear system solutions.
Eigenvalues, eigenvectors and the characteristic polynomial of a 2x2, 3x3 or 4x4 matrix, with every step.
Dot product, angle between vectors, magnitude, unit vector and projections of 2D to 6D vectors.
Free worked solutions for equations, systems, inequalities, factoring, derivatives, integrals, limits and matrices.
Learn more: For how to type matrices and vectors in the full calculator, read matrices and vectors.
Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?