Free Math Calculator

Matrix Calculator

Use this matrix calculator for matrix multiplication, addition, subtraction, transpose, determinant and inverse with exact fractions and step-by-step working.

✓ Free to use✓ Dynamic calculation steps✓ Input validation✓ Mobile friendly

Calculator

Enter your values

Enter your own values. The result starts blank and clears whenever an input changes.

Choose an operation. Enter one row per line, with entries separated by spaces or commas. Each matrix supports 1–4 rows and 1–4 columns. Use integers, decimals with up to six places, or fractions such as -2/3. Values and fraction numerator/denominator magnitudes must not exceed 10,000. Do not use brackets or thousands separators.

What does this matrix calculator do?

This matrix calculator works with small rectangular arrays of numbers. It provides six operations: matrix addition, subtraction, multiplication, transpose, determinant and inverse. The answer uses exact fractions rather than rounded decimal approximations. A result panel explains the output dimensions, the selected operation and the actual arithmetic used for your entries.

A matrix is not a list of unrelated equations. Its rows and columns are part of its meaning, and changing their order changes the calculation. This page is intended for school and college exercises, teaching examples and checking small numerical arrays. If your goal is to find unknown variables from simultaneous equations, use the System of Equations Calculator instead. That tool interprets an augmented system and classifies its solutions.

There are no country-specific tax rules or measurement conversions involved in these operations. Learners in the United States, United Kingdom, Canada and Australia can use the same matrix rules. The supported size is deliberately small so the displayed working remains readable; this is not a large numerical-analysis package.

How to enter matrices and choose an operation

  1. Select addition, subtraction, multiplication, transpose, determinant or inverse.
  2. Enter Matrix A with one row on each line.
  3. For a two-matrix operation, also enter Matrix B.
  4. Calculate and review the result together with its dimensions and working.

To enter a two-by-two matrix, type 1 2 on the first line and 3 4 on the second. Spaces separate entries; commas are also supported as entry separators, not as thousands separators. Every row in one matrix must contain the same number of entries. A blank interior row, a missing comma-separated entry or an unsupported symbol is rejected rather than silently replaced by zero.

For fractions, write a slash: 1/2 or -3/4. The Fraction Calculator can check separate fraction arithmetic before you enter a matrix. Ordinary decimals with at most six places are interpreted exactly as typed. Exponent notation, brackets and algebraic variables are not accepted. The form starts blank, and changing an input or operation clears the previous answer. For one-matrix operations, Matrix B is hidden and its contents are ignored.

Affiliate disclosure: As an Amazon Associate I earn from qualifying purchases.

For a separate arithmetic check, you may browse scientific calculators (paid link). Check the model’s supported functions; basic scientific devices do not necessarily support matrix operations or sequence sums. No purchase is required.

Addition, subtraction, multiplication and transpose

Addition and subtraction match entries at the same row and column. Both input matrices must have identical dimensions. For example, subtracting a two-by-three matrix from a three-by-two matrix is not permitted even though both have six entries. The calculator checks this requirement before doing any arithmetic.

Matrix multiplication is different from multiplying corresponding entries. For A × B, each result entry is the dot product of one row of A and one column of B. The number of columns in A must equal the number of rows in B. If A is two-by-three and B is three-by-four, the result is two-by-four. Every dot product is shown separately, making it easier to locate a sign or transcription mistake.

The transpose switches rows and columns. It does not invert the matrix or take reciprocals of the entries. A two-by-three matrix becomes three-by-two. For a separate check of the arithmetic rules used in expressions, the Scientific Calculator can help, but a scalar expression is not a substitute for respecting matrix dimensions.

Determinant and inverse of a square matrix

Determinant and inverse are offered only when Matrix A is square. The determinant is one scalar value. For a two-by-two matrix with rows a, b and c, d, the determinant is ad − bc. For larger supported sizes, this implementation computes signed minors and shows the expansion along the first row. A one-by-one determinant equals its single entry.

An inverse exists exactly when the square matrix has a nonzero determinant. The inverse routine augments A with the identity matrix and performs exact Gauss–Jordan row operations until the left half becomes the identity. Row swaps, pivot divisions and eliminations appear in the calculation steps. The right half is then A inverse.

If the determinant is zero, the result explicitly says “No inverse.” That is a legitimate mathematical classification, not a failure to calculate. No infinity, guessed matrix or division by zero is produced. A matrix transpose can still exist when the inverse does not, because these are different operations.

Worked matrix multiplication and inverse examples

Let A have rows 1, 2 and 3, 4, and let B have rows 5, 6 and 7, 8. Multiplication gives rows 19, 22 and 43, 50. The top-left entry is 1 × 5 + 2 × 7 = 19. Swapping the order gives a different matrix, so do not assume that A × B equals B × A.

For A with rows 1, 2 and 3, 4, the determinant is 1 × 4 − 2 × 3 = −2. Its inverse has rows −2, 1 and 3/2, −1/2. Multiplying that inverse by A in either order gives the identity matrix exactly. For rows 1, 2 and 2, 4, the determinant is zero and no inverse exists.

These examples use small integers so you can check each stage by hand. Your own fraction inputs may generate larger numerators and denominators. Preserve signs and row order when comparing your answer with a textbook or another calculator.

Exact verification and supported input limits

The tool supports one through four rows and columns, including rectangular matrices for operations that permit them. Entry values must lie between −10,000 and 10,000. Fraction numerator and denominator magnitudes are also limited to 10,000, with a nonzero denominator. Each matrix text field is limited to 1,200 characters. Complex entries, symbolic variables, eigenvalues, matrix powers and unrestricted matrix sizes are outside this page’s scope.

Exact rational arithmetic avoids rounding a small nonzero determinant to zero. Inverse results are checked through both A times inverse and inverse times A. Multiplication is checked through the transpose-product identity; addition, subtraction and transpose have reversible checks. These tests verify the implementation’s arithmetic, not whether the input matrix represents the right real-world model.

Copy, Download and Print include the displayed result and steps. Matrix entries are processed in the browser and are not saved by this calculator. The website’s separately disclosed analytics and advertising services remain in place. For safety-critical engineering or financial work, verify the model and source data independently.

Matrix Calculator FAQs

Sources and methodology

These educational references explain the mathematical ideas. This independently implemented calculator is not affiliated with their publisher. Its supported methods, exact checks and limits are documented above.