gizmobench
BrowseDaily

Matrix Calculator

Add, subtract, multiply, transpose, invert, row reduce and take determinants, ranks and integer powers of real numeric matrices up to 8×8. Arithmetic uses exact fractions; decimal display rounds only the answer. Fill the grids or paste a whole matrix with one row per line. A singular square matrix is identified exactly and its ordinary inverse is refused.

A2 × 2
RowsColumns
B2 × 2
RowsColumns
1922
4350
Display

Row by column. The columns of A have to match the rows of B, and B × A is usually a different matrix.

Paste a whole matrix

Use one row per line or semicolon. Separate entries with spaces, tabs or commas; write fractions as 1/3. Brackets around each row are optional. Applying a matrix replaces that grid and its dimensions.

  • Determinantnot zero, so A can be inverted
    -2
  • Rank of Aall 2 rows independent; the most a 2×2 matrix can have
    2
  • A × Bexact fractions
    [ 19 22 ] [ 43 50 ]

Each entry is a row of A paired off against a column of B and summed. Matrix multiplication is not commutative, so B × A is usually a different matrix.

Every calculation uses exact rational numbers. Integers, decimals and fractions are read exactly. A singular square matrix has determinant 0 and no ordinary inverse. Fraction display keeps the exact value; Decimal rounds only the displayed result. Floating-point methods need care with rounding residuals near zero. This calculator accepts real numeric entries, not complex numbers or symbolic variables. It shows the finished answer rather than an intermediate row-operation trace.

Common questions

Why does this show fractions instead of decimals?
Because the answer usually is a fraction. Inverting an integer matrix divides by its determinant, so [1 2; 3 4] inverts to [-2 1; 3/2 -1/2], and the third of those entries is 3/2 exactly. A calculator working in decimals has to print 1.5 for that one and 0.3333333333 for a third, and you are left guessing which repeating decimal was meant. Here every entry is a pair of whole numbers, added and multiplied with no rounding at any step. The Decimal display switches the same values to a chosen number of places when a decimal is what you want.
When does a matrix have no inverse?
A square matrix has an ordinary two-sided inverse exactly when its determinant is not zero. A zero determinant means the rows are dependent. For [1 2 3; 4 5 6; 7 8 9], the determinant is exactly 0 and rank is 2. Floating-point methods can leave small rounding residuals near zero and need a tolerance; this calculator uses exact fractions and reports the singular matrix directly.
Does the order of matrix multiplication matter?
Yes. A × B and B × A are different matrices in general, and often only one of them is even defined. For A × B the number of columns in A must equal the number of rows in B, and the result has the rows of A and the columns of B. With A = [1 2; 3 4] and B = [5 6; 7 8], A × B is [19 22; 43 50] while B × A is [23 34; 31 46]. When the dimensions do not line up the tool says which two numbers have to match and what to change.
How large a matrix can it handle?
Each grid runs from 1×1 to 8×8, including rectangular matrices. Each entry accepts at most 60 characters, with scientific notation exponents from -1000 to 1000. A matrix power accepts integer exponents from -64 to 64 and checks projected entry growth against an estimated entry length of 600 digits before multiplication. Exact arithmetic can take longer as fractions grow; no instantaneous result is promised for every input. The dimension and number controls state failures explicitly.
How do I type a fraction or a decimal into a cell?
Enter a whole number, a decimal such as 0.5, a fraction such as 1/3, or scientific notation such as 1.5e-2. Unicode minus and fraction slash characters are normalized. A blank cell means zero. Spaces around a fraction slash are accepted in a single cell, but two numbers such as 1 2 are refused instead of joined. To fill a whole grid, open Paste a whole matrix, use one row per line or semicolon and separate entries with spaces, tabs or commas. Write pasted fractions as 1/3. Apply validates the full shape and replaces that grid and its dimensions.
What is reduced row echelon form for?
RREF is the finished Gauss-Jordan reduction: each pivot is 1 and is alone in its column. The rank counts pivots. For an augmented system, the last column can be read as constants when the coefficient block reduces to identity; the worked Augmented system example gives x = 2, y = 3, z = -1. This calculator reports the full matrix rank, including that last column, and does not automatically label free variables, inconsistent systems or intermediate row operations. Use System of Equations Calculator for those solution workflows.
Is a matrix power the same as a matrix exponential?
No. Aᵏ uses an integer exponent: A² is A × A, A⁰ is the identity and A⁻¹ is the inverse when it exists. The matrix exponential e^A is a different operation defined by an infinite series and is not calculated here. Complex entries, symbolic variables, cofactor/adjugate output, a pseudoinverse and a null-space basis are also outside this tool.
What is remembered when I open a preset or example?
Only controls you deliberately edit update browser storage, one field at a time. A page visit or worked example alone does not replace a saved draft, and unavailable storage does not prevent arithmetic. A preset operation and any preset matrices win on that page after restoration. Text and LaTeX copy the displayed result; if access is blocked the page tells you how to copy it manually.

Exact: matrices are computed in rational arithmetic, so an inverse of an integer matrix is shown as fractions rather than rounded decimals, and a singular matrix is reported as singular instead of producing huge numbers.