Wize Engineering Mathematics Textbook > Linear Algebra

Matrix Multiplication, Determinant and Inverse

Products, Determinants, and Inverses

If AA is m×nm\times n and BB is n×pn\times p, then ABAB is defined and has size m×pm\times p. Its entry in row ii, column jj is the dot product of row ii of AA with column jj of BB:


(AB)ij=∑k=1naikbkj.(AB)_{ij}=\sum_{k=1}^{n}a_{ik}b_{kj}.


Only the inner dimensions have to agree, and they disappear from the answer: the product keeps the outer pair. Order matters. Even when both products exist, ABAB and BABA need not be equal or even have the same size.


For A=(abcd)A=\begin{pmatrix}a&b\\c&d\end{pmatrix}, the determinant is det⁡A=ad−bc\det A=ad-bc. For a 2-by-2 matrix, the absolute value of its determinant is the area scale factor of the associated planar transformation, while its sign records orientation; the figure shows a unit square and its image under a matrix of determinant 22.


A square matrix is invertible exactly when its determinant is nonzero, because a zero determinant means its image has lower dimension than the ambient space.


For a 2-by-2 matrix, the image lies in a line or is a point, so no map can undo that loss of information.

A matrix carries the unit square to a parallelogram. The absolute value of the determinant is the factor by which area is scaled, and the sign of the determinant records whether the orientation of the corners is preserved or reversed. In this drawing both panels use the same scale, and the determinant is 2.

A matrix carries the unit square to a parallelogram. The absolute value of the determinant is the factor by which area is scaled, and the sign of the determinant records whether the orientation of the corners is preserved or reversed. In this drawing both panels use the same scale, and the determinant is 2.

Determinant of the parameter-dependent matrix A(s)

Determinant of the parameter-dependent matrix A(s)

Determinants multiply

For square matrices of the same size, det⁡(AB)=det⁡(A)det⁡(B)\det(AB)=\det(A)\det(B). Geometrically, for 2-by-2 matrices this means their area scale factors multiply; in n dimensions, the absolute determinants give the corresponding n-dimensional volume scale factors.


For matrices of order at least 2, a determinant does not uniquely identify a matrix. Thus matching determinants is not sufficient in general to confirm a proposed product, although a mismatch disproves it.

Undoing a matrix action

For an invertible two-by-two matrix,


A−1=1ad−bc(d−b−ca).A^{-1}=\frac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}.


The diagonal entries swap places and the off-diagonal entries change sign; only then does the factor 1/det⁡A1/\det A apply. The inverse satisfies A−1A=AA−1=IA^{-1}A=AA^{-1}=I, so Ax=bA\mathbf x=\mathbf b can be solved as x=A−1b\mathbf x=A^{-1}\mathbf b. For a product, the order reverses: (AB)−1=B−1A−1(AB)^{-1}=B^{-1}A^{-1}, because the last map applied must be the first one undone.


Worked example: Let A=(1237)A=\begin{pmatrix}1&2\\3&7\end{pmatrix} and B=(012−1)B=\begin{pmatrix}0&1\\2&-1\end{pmatrix}. Row-by-column multiplication gives AB=(1(0)+2(2)1(1)+2(−1)3(0)+7(2)3(1)+7(−1))=(4−114−4)AB=\begin{pmatrix}1(0)+2(2)&1(1)+2(-1)\\3(0)+7(2)&3(1)+7(-1)\end{pmatrix}=\begin{pmatrix}4&-1\\14&-4\end{pmatrix}. Since det⁡A=7−6=1\det A=7-6=1, the inverse exists and is A−1=(7−2−31)A^{-1}=\begin{pmatrix}7&-2\\-3&1\end{pmatrix}; multiplying in either order returns the identity. The multiplicative rule checks out too: det⁡B=0(−1)−1(2)=−2\det B=0(-1)-1(2)=-2 and det⁡(AB)=4(−4)−(−1)(14)=−16+14=−2=det⁡A⋅det⁡B\det(AB)=4(-4)-(-1)(14)=-16+14=-2=\det A\cdot\det B.


For larger square matrices, cofactor expansion or row reduction can compute a determinant or inverse, but the same invertibility condition remains.


A common multiplication mistake is to combine entries in matching positions instead of taking row-column dot products. A common inverse mistake is to divide every original entry by the determinant without swapping the diagonal entries and negating the off-diagonal entries.


Verify an inverse by multiplication rather than trusting its appearance, and verify a product by recomputing one entry rather than by checking its determinant.

If AA is 2×32\times3 and BB is 3×43\times4, what is the size of ABAB?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Compute det⁡(4−135)\det\begin{pmatrix}4&-1\\3&5\end{pmatrix}.

Give your answer as a number.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

The graph shows det⁡A(s)\det A(s) for A(s)=(s231)A(s)=\begin{pmatrix}s&2\\3&1\end{pmatrix}. What happens at the horizontal-axis crossing?

A matrix carries the unit square to a parallelogram. The absolute value of the determinant is the factor by which area is scaled, and the sign of the determinant records whether the orientation of the corners is preserved or reversed. In this drawing both panels use the same scale, and the determinant is 2.

A matrix carries the unit square to a parallelogram. The absolute value of the determinant is the factor by which area is scaled, and the sign of the determinant records whether the orientation of the corners is preserved or reversed. In this drawing both panels use the same scale, and the determinant is 2.

Determinant of the parameter-dependent matrix A(s)

Determinant of the parameter-dependent matrix A(s)

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors