🧮

Matrix Calculator

Add, multiply, transpose, invert matrices and find determinant
Matrices 📂 Study 👤 ToolWorld 🏷️ v1.7.0
Input Rows separated by semicolons or newlines, columns by spaces or commas

Result

Results appear here once you fill in the fields

Statistics
Shortcuts

Tap an operation name to load matching sample matrices.

How to Use

📖 Introduction

Matrices sit at the heart of elective high school mathematics and of university linear algebra, and doing multiplication or inversion by hand beyond order three is notoriously error prone. This tool brings matrix addition, subtraction, multiplication, transposition, determinant, inverse and rank together on one page. Separate rows with semicolons or newlines and columns with spaces or commas, paste your matrix into the field, pick an operation, and the result appears immediately as a tidy table. Multiplication is carried out element by element as row times column; determinants and inverses are obtained by Gaussian elimination with partial pivoting; the rank comes from the number of nonzero rows in the row echelon form. The numerics are stable and singular matrices are handled correctly. You can choose between zero and six decimal places for the output, and values whose absolute value falls below one trillionth are flushed to zero so that distractions such as negative zero never appear. Dimension mismatches, non square input where a square matrix is required, and matrices that cannot be inverted all produce plain language messages instead of a stream of wrong numbers. Everything runs locally in your browser with no network service involved. Both input matrices are echoed back underneath the result, which catches the most common source of wrong answers: a row typed with the wrong number of entries. Because Gaussian elimination uses partial pivoting, ill conditioned matrices that defeat naive elimination still produce sensible values, and singular matrices are reported plainly rather than producing a table of infinities. The rank of A is always shown in the statistics panel, so you can confirm at a glance whether a system is consistent before attempting to invert. Choosing fewer decimal places keeps a large output readable, while six places are available when the values matter for later work. No network request is made at any point.


✨ Features

  • Addition, subtraction and multiplication of two matrices with strict dimension checking.
  • Transpose, determinant, inverse and rank are all supported.
  • Determinants and inverses use Gaussian elimination with partial pivoting for better stability.
  • Results are shown in a neat table with a choice of zero to six decimal places.
  • Dimension errors, non square input and singular matrices all give clear plain language messages.
  • The input matrices A and B are echoed back so you can verify what you typed.

🚀 How to use

  1. Type the entries of matrix A row by row, separating rows with semicolons or newlines.
  2. Separate columns with spaces or commas, so 1 2;3 4 means a two by two matrix.
  3. For operations that need two matrices, fill in matrix B as well.
  4. Choose the operation and the number of decimal places for the result.
  5. Tap an operation name to load a matching sample matrix in one click.

⚠️ Notes

  • Input format. Every row must contain the same number of entries, otherwise the input is rejected.
  • Dimension rules. Addition and subtraction need matching shapes; multiplication needs the columns of A to equal the rows of B.
  • Invertibility. Only square matrices with a nonzero determinant have an inverse; singular ones are reported.
  • Numerical precision. Floating point arithmetic is used and values near zero are flushed below a trillionth threshold.
  • Size limit. Keep the order moderate; elimination becomes slow for very large matrices.

Related

⏫︎
💬