Matrix Calculator

Add, multiply, invert, transpose, factor, and more matrix operations.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a matrix, pick an operation and read the result with working. The determinant of [1 2; 3 4] is −2, and the inverse of [4 7; 2 6] is [0.6 −0.7; −0.2 0.4].

How to use

1
Step 1
Type matrix A with one row per line and spaces between entries.
2
Step 2
For add or multiply, type matrix B too.
3
Step 3
Choose the operation.
4
Step 4
Press Calculate to see the result and the steps.

How it works

One tool covers add, multiply, transpose, trace, determinant, rank, inverse, adjugate, power, eigenvalues, LU, QR, SVD, null space and least squares. For a 2×2 matrix the determinant is ad − bc, and the inverse is 1/det times the adjugate. A matrix with determinant 0 has no inverse.

det [a b; c d] = ad − bc      A⁻¹ = adj(A) ÷ det(A)      (AB)ᵢⱼ = Σ Aᵢₖ Bₖⱼ

Worked example

Inverse of a 2×2 matrix

Input
A = [4 7; 2 6]
Output
[0.6 −0.7; −0.2 0.4]
Walkthrough
det = 4×6 − 7×2 = 10. The adjugate is [6 −7; −2 4]; dividing by 10 gives [0.6 −0.7; −0.2 0.4].

Limitations

  • Determinant, trace, inverse and power need a square matrix.
  • A singular matrix such as [1 2; 2 4] has no inverse and returns an error.
  • Negative powers are refused; invert the matrix first, then raise it to a positive power.

Questions

What is the determinant of [1 2; 3 4]?
−2, from 1×4 − 2×3.
What is [1 2; 3 4] times [5 6; 7 8]?
[19 22; 43 50].
Why can't I invert [1 2; 2 4]?
Its determinant is 0, so it is singular and has no inverse.
What is a matrix to the power 0?
The identity matrix.

Features

  • 15 operations in one tool
  • Step-by-step working
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Derivative as a concept

    Khan Academy

    When general calculators hand off to calculus tools.

    Watch on YouTube
  • Finding a percentage

    Khan Academy

    Percentage basics used across many calculator pages.

    Watch on YouTube
  • Pi

    Math is Fun

    What π means when calculators return pi-based results.

  • Pre-algebra

    Khan Academy

    Number sense practice that supports general calculator use.