ManyTools

Matrix Calculator

Find the inverse, determinant or transpose of a matrix, or add, subtract and multiply two matrices, with every answer computed in exact fractions.

Last updated: November 2, 2026How this is calculated →

This matrix calculator finds inverses, determinants, transposes, sums and products up to 6 x 6. The inverse of the 2 x 2 matrix with rows 2 1 and 5 3 is the matrix with rows 3 -1 and -5 2, because its determinant is 6 - 5 = 1, from 2 times 3 minus 1 times 5. The calculator works up to 6 x 6 in exact fractions.

This calculator is for learning and checking matrix arithmetic and is not a substitute for showing your working where a course asks for it. It handles matrices up to 6 x 6 with entries you type, and it does not do eigenvalues or solve systems directly.

Result

3-1
-52

Computed in exact fractions. Decimals shown are rounded.

We email you a link back to this page and add you to occasional ManyTools emails; every email has a one-click unsubscribe.

Embed this calculator on your site →

About the Matrix Calculator

A matrix is a grid of numbers. Adding or subtracting works entry by entry, so both matrices need the same shape. Multiplying A x B takes each row of A against each column of B, so A needs as many columns as B has rows, and A x B is usually not the same as B x A. The transpose swaps rows and columns. The determinant is a single number from a square matrix; for a 2 x 2 matrix with rows a b and c d it is ad minus bc. The inverse is the matrix that multiplies with the original to give the identity, the matrix with 1s on the diagonal and 0s elsewhere. The calculator finds it with row operations on the matrix placed beside the identity, until the identity appears on the left. A matrix whose determinant is 0 has no inverse. Every step keeps exact fractions, so the inverse of the matrix with rows 1/2 1/3 and 1/4 1/5 comes out as whole numbers rather than long decimals.

Frequently asked questions

How do I find the inverse of a 2 x 2 matrix?+

For rows a b and c d, swap a and d, change the signs of b and c, and divide every entry by the determinant ad minus bc. For rows 2 1 and 5 3 the determinant is 1, so the inverse has rows 3 -1 and -5 2.

Why does my matrix have no inverse?+

Its determinant is 0, which means one row can be built from the others. Row reduction then leaves a row of zeros, and there is no way to reach the identity. The rows 2 3 and 4 6 are an example: the second row is twice the first.

Why does the order matter when multiplying?+

Each entry of A x B comes from a row of A and a column of B, so swapping the matrices pairs different numbers. With rows 2 1 and 5 3 for A and rows 1 2 and 3 4 for B, A x B starts with 5 while B x A starts with 12.

Can I enter fractions and decimals?+

Yes. Type fractions like 3/4 or -1/3 and decimals up to eight places. The calculator converts them to exact fractions, so 0.1 is treated as exactly one tenth and answers show as fractions, with decimals, rounded to four places, shown under the result when an entry is not a whole number.

Method for the inverse: OpenStax, College Algebra 2e, section 7.7, Solving Systems with Inverses: a matrix B with AB = BA = I is the inverse of A, found by row-reducing A beside the identity until the identity appears on the left; not every square matrix has one, and a 2 x 2 matrix has none when ad - bc = 0.

Embed this calculator

Free to use on your own site. Paste this snippet where you want the matrix calculator to appear — it resizes itself automatically.

Embed code
<iframe
  src="https://manytools.co/embed/matrix-calculator"
  title="Matrix Calculator by ManyTools"
  data-manytools="matrix-calculator"
  width="100%"
  height="640"
  loading="lazy"
  style="border:0;width:100%;max-width:720px"></iframe>
<script>
(function () {
  window.addEventListener("message", function (e) {
    if (e.origin !== "https://manytools.co") return;
    var d = e.data || {};
    if (d.type !== "manytools:embed:height" || d.slug !== "matrix-calculator") return;
    var f = document.querySelector('iframe[data-manytools="matrix-calculator"]');
    if (f && d.height) f.style.height = d.height + "px";
  });
})();
</script>
Plain link (fallback)
<a href="https://manytools.co/math/matrix-calculator">Matrix Calculator by ManyTools</a>