Skip to content · 跳到主要内容

Matrix Calculator

Add, subtract, multiply, transpose, find determinants and invert matrices

Result dimensions
--
--
Determinant A
--
Determinant B

      

Matrix Calculator

Enter one matrix row per line. The page checks dimensions before addition, subtraction and multiplication, and uses pivoting for determinants and inverses.

(A + B)ij = Aij + Bij
(AB)ij = Σ AikBkj
A−1A = I

Getting the row format right

Type one matrix row per line, separating entries with spaces or commas. Rows must all be the same length or the page reports the shape problem before calculating anything. Dimensions are checked against each operation: addition and subtraction need identical shapes, multiplication needs the first matrix's column count to equal the second matrix's row count, and determinants and inverses need a square matrix.

What each operation asks

Matrix multiplication is the pickiest: an m × n matrix times an n × p matrix yields m × p, and the entry at row i, column j is the dot product of A's row i with B's column j. Determinants use pivoting for numerical stability, which matters when entries differ by many orders of magnitude. The inverse is only attempted when the determinant is nonzero — a zero determinant means the matrix collapses information and cannot be undone.

Using the inverse to solve systems

A linear system Ax = b has solution x = A⁻¹b whenever the inverse exists. Multiply the inverse the page gives you against your b vector and the result is the answer vector, which is often faster than elimination for small systems you need to reuse with several different b values.

Frequently Asked Questions

How do I enter a matrix?

Put each row on a separate line and separate columns with spaces or commas. Matrices can have up to six rows and six columns.

Why can an operation fail?

Addition and subtraction require equal dimensions, multiplication requires matching inner dimensions, and determinants or inverses require a square matrix.

Which operations are supported?

Addition, subtraction, multiplication, determinant and inverse, subject to the dimension rules for each. The size limit is six rows by six columns.

How is the inverse computed?

By Gauss-Jordan elimination with partial pivoting, which is numerically more stable than cofactor expansion on larger matrices.

What is the determinant used for?

It shows whether a matrix is invertible, since a zero determinant means no inverse exists, and it describes how the transformation scales area or volume.

Why is a determinant rejected for a rectangular matrix?

The determinant is defined only for square matrices, so a non-square input has no determinant.

Last reviewed: October 5, 2026 · How we calculate · Sources: Published formula reference; verify domain-specific assumptions before making a decision