Matrix Calculator

Perform matrix arithmetic, determinants, inverses, transpositions and powers.

Matrix A Input
row
× column
Matrix B Input
row
× column
Result

Complete Matrix Calculator Guide & Information

1. What is a Matrix?

A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. Matrices are used to represent linear transformations, systems of linear equations, and datasets. A matrix with m rows and n columns is called an m×n matrix (read "m by n").

Individual entries of a matrix A are written as aij, where i is the row index and j is the column index.

2. Matrix Addition & Subtraction

Two matrices can be added or subtracted only if they have the same dimensions (same number of rows and columns). Each entry of the result is the sum or difference of the corresponding entries.

(A + B)ij = aij + bij
(A − B)ij = aij − bij

3. Scalar Multiplication

Multiplying a matrix by a scalar (single number) multiplies every entry by that scalar.

(cA)ij = c × aij

4. Matrix Multiplication

Matrix multiplication is defined only when the number of columns in the first matrix equals the number of rows in the second matrix. If A is m×n and B is n×p, then AB is m×p. Each entry is the dot product of a row from A and a column from B.

(AB)ij = Σk=1n aik × bkj

5. Transpose

The transpose of a matrix swaps its rows and columns. An m×n matrix becomes an n×m matrix.

(AT)ij = aji

6. Determinant

The determinant is a scalar value computed from a square matrix. It represents the scaling factor of the linear transformation described by the matrix. A determinant of zero means the matrix is singular (not invertible).

7. Matrix Inverse

The inverse of a square matrix A, denoted A−1, is the matrix such that A × A−1 = A−1 × A = I, where I is the identity matrix. Not all square matrices are invertible; a matrix is invertible if and only if its determinant is non-zero.

A−1 = (1 / det(A)) × adj(A)

where adj(A) is the adjugate (transpose of the cofactor matrix).

8. Matrix Powers

Raising a square matrix to a positive integer power means multiplying it by itself that many times.

9. Input & Control Definitions

10. Worked Examples

Example 1 — Matrix multiplication (default): 4×4 A × 4×4 B

Example 2 — 2×2 determinant:

Example 3 — 2×2 inverse:

11. Real-World Applications

12. Special Matrix Types

Type Definition Property
Identity matrix I1s on diagonal, 0s elsewhereAI = IA = A
Zero matrixAll entries zeroA + 0 = A
Diagonal matrixNon-zero only on main diagonalEasy to multiply
SymmetricAT = ASymmetric across diagonal
Skew-symmetricAT = −ADiagonal entries are zero
OrthogonalAT = A−1Preserves lengths and angles
Singulardet(A) = 0No inverse exists

13. Important Notes

14. Related Mathematical Concepts

15. References

1. Cayley, Arthur. "A Memoir on the Theory of Matrices." 1858.
2. Strang, Gilbert. "Introduction to Linear Algebra." Wellesley-Cambridge Press. 2016.
3. Lay, David C. "Linear Algebra and Its Applications." Pearson. 2015.
4. Golub, Gene H. and Van Loan, Charles F. "Matrix Computations." Johns Hopkins University Press. 2013.
5. Horn, Roger A. and Johnson, Charles R. "Matrix Analysis." Cambridge University Press. 2012.
6. Trefethen, Lloyd N. and Bau, David. "Numerical Linear Algebra." SIAM. 1997.