Calculators & Converters

Matrix Calculator

Enter a small rectangular matrix and choose a matrix operation. The calculator detects dimensions, checks whether the operation is defined, and displays a labeled result table with copy and text export controls.

Free online tool

Loading tool…

One row per line; separate entries with spaces or commas. Dimensions are detected from your input: 1–5 rows and columns, entries up to 1e12 in magnitude. Decimal arithmetic is approximate; inversion rejects tiny scaled pivots below 1e−12.

Calculations run locally in your browser. This tool does not upload the numbers you enter.

GET STARTED

How to use the Matrix Calculator

  1. 01

    Enter one row per line, separating entries with spaces or commas. All rows must have the same number of entries.

  2. 02

    Select an operation. Enter B for addition, subtraction, and multiplication.

  3. 03

    Calculate and review the result dimensions. Copy or download the tab-separated result with its input matrices.

Examples

Matrix multiplication

For A with rows 1 2 and 3 4, and B with rows 2 0 and 1 2, A × B has rows 4 4 and 10 8.

A two-by-two inverse

For A with rows 1 2 and 3 4, det(A) = −2. Its inverse has rows −2 1 and 1.5 −0.5.

Dimensions define the operation

Addition and subtraction require matching row and column counts. For A × B, the number of columns in A must equal the number of rows in B; the result has A’s row count and B’s column count. The transpose swaps rows and columns and works for rectangular inputs.

Determinants and inverses

A determinant is defined here only for square matrices. An inverse is also square and exists only when the matrix is nonsingular. Inversion uses scaled partial pivoting and Gauss–Jordan elimination; a pivot that is too small relative to its original row scale causes a validation error.

Numerical limitations

Entries and operations use floating-point numbers, displayed to 12 significant digits. A determinant close to zero can involve severe cancellation, and an ill-conditioned inverse can magnify small input errors. This tool is intended for small, inspectable calculations rather than large scientific matrix workloads.

What to know

  • Maximum size is 5 × 5; entry magnitude is limited to 1e12.
  • Inverse calculations reject scaled pivots below 1e−12. Numerical output is not an exact symbolic proof.

Common questions

Does A × B equal B × A?

Usually not. Multiplication order matters, and the reverse multiplication may not even be defined for the same dimensions.

Can I enter a single number?

Yes. A single entry is a 1 × 1 matrix. Its determinant is that number and its inverse, when nonzero and supported, is the reciprocal.

Why is my matrix rejected?

Check that rows are rectangular, contain numeric values, and stay within the 1–5 row and column limits. Some operations impose additional dimension requirements.

Does it find eigenvalues?

No. The supported operations are addition, subtraction, matrix multiplication, transpose, determinant, and inverse.

Sources & references