Matrix Calculator
Add, subtract, multiply, transpose, find determinants and invert matrices
Add, subtract, multiply, transpose, find determinants and invert matrices
Enter one matrix row per line. The page checks dimensions before addition, subtraction and multiplication, and uses pivoting for determinants and inverses.
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.
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.
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.
每行输入一个矩阵行。计算器会在加减乘前检查维度,并通过选主元消元计算行列式和逆矩阵。
每行矩阵占一行,元素之间用空格或逗号分隔。各行长度必须一致,否则页面会先报形状问题、不做任何计算。维度检查跟着运算走:加法和减法要求两个矩阵形状完全相同;乘法要求第一个矩阵的列数等于第二个矩阵的行数;行列式和逆矩阵要求方阵。
矩阵乘法最挑剔:m × n 矩阵乘 n × p 矩阵得 m × p,第 i 行第 j 列的元素是 A 的第 i 行与 B 的第 j 列的点积。行列式计算带主元消去以保证数值稳定,元素之间量级相差悬殊时这点尤其要紧。行列式非零才会尝试求逆——行列式为零说明矩阵压丢了信息、不可还原。
只要逆矩阵存在,线性方程组 Ax = b 的解就是 x = A⁻¹b。把页面给出的逆矩阵乘上你的 b 向量,结果就是解向量。当同一组系数要配多组不同的 b 反复求解时,这条路通常比消元法更快。
Put each row on a separate line and separate columns with spaces or commas. Matrices can have up to six rows and six columns.
Addition and subtraction require equal dimensions, multiplication requires matching inner dimensions, and determinants or inverses require a square matrix.
Addition, subtraction, multiplication, determinant and inverse, subject to the dimension rules for each. The size limit is six rows by six columns.
By Gauss-Jordan elimination with partial pivoting, which is numerically more stable than cofactor expansion on larger matrices.
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.
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
最近复核:2026 年 10 月 5 日 · 我们的计算方法 · 来源:公式用于参考;涉及专业决定时请核对适用条件