Matrix Calculator: Multiply, Inverse, Det

Use this matrix calculator for linear algebra homework. Enter one or two matrices to add, subtract or multiply them, or find the transpose, determinant, inverse and rank. Sizes up to 6 by 6 are supported, with steps.

Matrix Calculator

Result

-

Determinant (when relevant)

-

This matrix calculator adds, subtracts and multiplies 2×2 and 3×3 matrices, and finds the determinant and inverse of matrix A. Type the entries into the grid, and the result appears as a neat matrix.

How to use the Matrix Calculator

  1. Pick a Size: 2 × 2 or 3 × 3. The grids for Matrix A and Matrix B resize to match.
  2. Choose an Operation: A + B, A − B, A × B, det(A) or the inverse of A.
  3. Fill in Matrix A, plus Matrix B if the operation needs it. Decimals and negatives are fine.
  4. Press Calculate and read the Result, the Determinant (for det and inverse) and a short note on the method used.

Formula

2×2: det [[a, b], [c, d]] = ad − bc
Inverse: A⁻¹ = (1/det) × [[d, −b], [−c, a]]
Product: entry (i, j) of AB = row i of A · column j of B

Addition and subtraction work entry by entry. Multiplication combines rows of A with columns of B. For 3×3 matrices, the inverse uses the cofactor (adjugate) method. A matrix with a determinant of 0 has no inverse, and the tool tells you so.

Example

A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]]. A × B = [[1·5 + 2·7, 1·6 + 2·8], [3·5 + 4·7, 3·6 + 4·8]] = [[19, 22], [43, 50]]. det(A) = 1·4 − 2·3 = −2, so A⁻¹ = (1/−2) × [[4, −2], [−3, 1]] = [[−2, 1], [1.5, −0.5]].

Frequently asked questions

How do you multiply two matrices?

Each entry of the result is a row of the first matrix times a column of the second: multiply matching entries and add them. Row 1 of A times column 1 of B gives the top-left entry.

Is matrix multiplication commutative?

No. In general, A × B is not equal to B × A. With the example matrices above, B × A = [[23, 34], [31, 46]], which differs from A × B.

What does a determinant of zero mean?

The matrix is singular: it squashes space flat and cannot be reversed, so it has no inverse. In a system of linear equations, it means there is no unique solution.

How do I check that an inverse is correct?

Multiply the matrix by its inverse. If you get the identity matrix (1s on the diagonal and 0s elsewhere), the inverse is right. You can do this here by entering A and the inverse and choosing A × B.

Work with matrices

How to use it

  1. Set the matrix size.
  2. Enter the values.
  3. Pick an operation.
  4. Read the result.

More questions

Can every matrix be inverted?

No. A matrix with determinant 0 has no inverse.

Why can't I multiply these?

Columns of the first must match rows of the second.

Can I solve equations with it?

Yes, or use the system of equations solver.

Related tools: System of Equations Solver, Binary Calculator, Scientific Calculator.

Inverse of a 2 × 2 matrix

Pick the size and the operation, type the matrix entries, then press Calculate. For inverse and determinant only matrix A is used. To turn inverse entries such as 0.6 into fractions, use the Fraction to Decimal Converter.

Worked example: for A = [[4, 7], [2, 6]], the determinant is 4 × 6 − 7 × 2 = 10. The inverse is [[0.6, -0.7], [-0.2, 0.4]], found by dividing the adjugate by 10.

More answers

How do I find the inverse of a 2 × 2 matrix?

Swap a and d, flip the signs of b and c, then divide every entry by the determinant ad − bc. For [[4, 7], [2, 6]] the determinant is 10, so the inverse is [[0.6, -0.7], [-0.2, 0.4]].

How do I find the determinant of a 2 × 2 matrix?

Multiply the main diagonal and subtract the other diagonal: ad − bc. For [[4, 7], [2, 6]] that is 24 − 14 = 10, and the tool shows the same value.