Matrix Calculator

Add, subtract and multiply matrices, and find the determinant, inverse, transpose and rank — up to 8×8.

Last updated:

A × B

Matrix calculator

Matrices come up in Class 12 maths, engineering, economics and computer graphics. This matrix calculator handles the operations you need most: addition, subtraction, multiplication, thedeterminant, the inverse, the transpose, the rank and the square of a matrix. Type your matrices as rows of numbers and switch between operations with one tap — results update as you type.

How to use it

  1. Type matrix A (and B, for operations that use two matrices), one row per line.
  2. Choose an operation. Sizes are checked, and you're told if they don't fit.
  3. Read the result; decimals are rounded to six significant figures.

Example

For A = [2 1; 1 3], det(A) = 2 × 3 − 1 × 1 = 5, so A has an inverse: A⁻¹ = ⅕ × [3 −1; −1 2] =[0.6 −0.2; −0.2 0.4]. With B = [1 0; 4 2], A × B = [2×1 + 1×4, 2×0 + 1×2; 1×1 + 3×4, 1×0 + 3×2] =[6 2; 13 6]. Solving a quadratic instead? Use thequadratic equation solver.

Frequently asked questions

How do I enter a matrix?
Type one row per line, with numbers separated by spaces or commas. You can also separate rows with a semicolon, like 1 2; 3 4. Fractions such as 1/2 are allowed.
When can two matrices be multiplied?
A × B works only when the number of columns of A equals the number of rows of B. A 2×3 matrix times a 3×4 matrix gives a 2×4 matrix. Matrix multiplication is not commutative: A × B is usually different from B × A.
When does a matrix have no inverse?
When its determinant is 0 — it is then called singular. Only square matrices can have an inverse, and A × A⁻¹ gives the identity matrix.
How is the determinant calculated?
For a 2×2 matrix [a b; c d] it is ad − bc. For larger matrices the calculator uses row reduction (Gaussian elimination), which gives the same answer as expanding by cofactors but works quickly for big matrices.