Ad Space

Matrix A

+

Matrix B

Result
Ad Space

How to Multiply Matrices Step by Step

To multiply two matrices, each entry in the result comes from taking a row of the first matrix and a column of the second, multiplying corresponding entries, and summing them up:

Cij=kAik×BkjC_{ij} = \sum_{k} A_{ik} \times B_{kj}

C: the resulting product matrix.

A, B: the two matrices being multiplied.

i, j: the row and column of the entry being computed in C.

k: the index summed over, pairing each column of A with the matching row of B.

This is why the number of columns in A must equal the number of rows in B — every row-column pair needs the same number of terms to pair up.

How to Find the Determinant of a Matrix

For a 2×2 matrix, the determinant is adbcad - bc, where aa and bb are the top row's entries and cc and dd are the bottom row's entries, read left to right. For larger matrices, you expand along a row (usually the first), multiplying each entry by its cofactor — the determinant of the smaller matrix left after removing that entry's row and column, with alternating signs — and summing the results. This recursive process is called cofactor expansion.

How to Find the Inverse of a Matrix

The inverse of a matrix AA is found by dividing its adjugate (the transpose of its cofactor matrix) by its determinant:

A1=adj(A)det(A)A^{-1} = \frac{\text{adj}(A)}{\det(A)}

A-1: the inverse of matrix A.

adj(A): the adjugate of A, the transpose of its cofactor matrix.

det(A): the determinant of A.

If the determinant is zero, this division is undefined — the matrix has no inverse and is called singular.

When Is a Matrix Singular?

A matrix is singular whenever its determinant equals zero. Geometrically, this means the transformation it represents flattens space into a lower dimension — collapsing a plane into a line, for instance — which throws away information that can never be recovered, so no inverse transformation exists.

Worked Example: A 3×3 Determinant by Cofactor Expansion

For the matrix:

(123014560)\begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}

Expanding along the first row gives 1(1×04×6)2(0×04×5)+3(0×61×5)1(1 \times 0 - 4 \times 6) - 2(0 \times 0 - 4 \times 5) + 3(0 \times 6 - 1 \times 5), which is 1(24)2(20)+3(5)=24+4015=11(-24) - 2(-20) + 3(-5) = -24 + 40 - 15 = 1. Each term pairs a first-row entry with the determinant of the 2×2 matrix left after deleting that entry's row and column, alternating + and − signs as you move across the row.

Transpose — Flipping Rows and Columns

The transpose of a matrix, written ATA^T, swaps every row for a column: the entry at row ii, column jj in AA becomes the entry at row jj, column ii in ATA^T. A square matrix that equals its own transpose is called symmetric. Transposing twice always returns the original matrix, and the transpose of a product reverses the order: (AB)T=BTAT(AB)^T = B^T A^T.

A Brief History of Matrices

Arrays of numbers used to solve systems of linear equations appear in Chinese mathematics as early as the 2nd century BCE, in a text called "The Nine Chapters on the Mathematical Art," which described a method essentially equivalent to modern Gaussian elimination roughly 1,800 years before it was formalized in the West. The term "matrix" itself, however, is much more recent, coined by British mathematician James Joseph Sylvester in 1850 (from the Latin word for "womb," suggesting a structure that gives rise to other things — in this case, determinants). Arthur Cayley developed much of the formal algebra of matrices — including matrix multiplication and inversion — in the 1850s and 1860s, largely independent of the equation-solving context that originally motivated arrays of numbers. Matrices became indispensable well beyond pure mathematics in the 20th century, forming the mathematical backbone of computer graphics, quantum mechanics, and the neural networks behind modern machine learning.

Common Matrix Mistakes

Assuming matrix multiplication is commutative — that A × B equals B × A — is the most common error, and it's usually false; order matters, and swapping it can even change the result's dimensions entirely if the matrices aren't square. Trying to add or multiply matrices with incompatible dimensions (the number of columns in the first must match the number of rows in the second for multiplication) is another frequent stumbling block. Forgetting that a matrix with a determinant of zero has no inverse — rather than assuming an inverse always exists — can also lead to nonsensical results when solving systems of equations.

Matrix Terms You Should Know

Square Matrix — a matrix with the same number of rows and columns, a requirement for having a determinant or inverse.

Identity Matrix — a square matrix with 1s along the diagonal and 0s elsewhere, functioning like the number 1 does in ordinary multiplication.

Determinant — a single number computed from a square matrix that indicates, among other things, whether the matrix has an inverse.

Singular Matrix — a matrix with a determinant of zero, meaning it has no inverse.

Eigenvalue — a special scalar associated with a matrix that describes how it stretches space along a particular direction (its corresponding eigenvector), a concept used heavily in physics and data science.

Frequently Asked Questions

What does it mean when a matrix has no inverse?

Its determinant is zero (it's "singular"), meaning the matrix collapses space into a lower dimension and can't be undone.

Does the order of multiplication matter for matrices?

Yes — matrix multiplication is not commutative. A × B usually does not equal B × A.

What is the identity matrix?

A square matrix with 1s on the diagonal and 0s elsewhere. Multiplying by it leaves any matrix unchanged.

Ad Space