Matrices and determinants

Mathematics · First-year university mathematics · about 10 min

Matrices organise numbers so that several linear relationships can be handled together. They describe systems of equations and transformations of vectors. The determinant helps you tell whether a square matrix has an inverse and how a transformation changes area.

The key idea

For a 2×22\times2 matrix,

A=(abcd),det⁡(A)=ad−bc\boxed{A=\begin{pmatrix}a&b\\c&d\end{pmatrix},\qquad\det(A)=ad-bc}

If det⁡(A)≠0\det(A)\ne0, then AA is invertible and A−1=1ad−bc(d−b−ca)A^{-1}=\frac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}.

Draw two side-by-side Cartesian coordinate panels with the same scale and range from -0.5 to 3.5 on both axes. In the left panel draw the unit square with vertices (0,0),(1,0),(1,1),(0,1), connected in that order and closed. In the right panel draw the parallelogram with vertices (0,0),(2,1),(3,3),(1,2), connected in that order and closed. The right panel is the image of the left under A=[[2,1],[1,2]]. Put a single right-pointing arrow between the panels, labelled A. Label the two shapes unit square and transformed square, respectively. Show coordinate axes and no extra geometry.
A matrix can turn a unit square into a parallelogram of different area.

Try it yourself

Drag a vector and change the matrix entries to see stretching, shearing and determinant changes.

Matrix multiplication

A matrix times a vector combines each row of the matrix with the vector's entries. For example, (2103)(xy)=(2x+y3y)\begin{pmatrix}2&1\\0&3\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}2x+y\\3y\end{pmatrix}. For two matrices, each entry in the product is a row-by-column dot product. The inner dimensions must agree: an m×nm\times n matrix can multiply an n×pn\times p matrix, producing an m×pm\times p matrix. In general, reversing the order changes the result, so ABAB need not equal BABA. Check dimensions before doing any arithmetic.

Determinants and invertibility

For A=(abcd)A=\begin{pmatrix}a&b\\c&d\end{pmatrix}, the determinant is ad−bcad-bc, not ab−cdab-cd. The absolute determinant is the factor by which the associated two-dimensional transformation changes area. If the determinant is negative, orientation reverses. If it is zero, a square or parallelogram can collapse onto a line or point. The transformation then loses information and the matrix has no inverse. For a nonzero determinant, the standard 2×22\times2 inverse swaps the diagonal entries, negates the off-diagonal entries and divides by the determinant.

Draw two Cartesian panels of equal scale with x from -0.5 to 2.5 and y from -0.5 to 1.5. On the left draw the unit square with vertices (0,0),(1,0),(1,1),(0,1). On the right draw only the image of its vertices under the matrix A=[[2,0],[0,0]]: both (0,0) and (0,1) map to (0,0), while both (1,0) and (1,1) map to (2,0). Display the image as a bold horizontal segment from (0,0) to (2,0), with filled dots at both endpoints. Put a right-pointing arrow between panels labelled A. Under the right panel write det(A)=0. Do not draw a parallelogram on the right.
A zero determinant collapses a two-dimensional shape onto a line.

Solving simultaneous equations

Write two linear equations in the form Ax=bA\mathbf x=\mathbf b, with the unknowns in a column vector. If AA is invertible, multiply on the left by A−1A^{-1} to obtain x=A−1b\mathbf x=A^{-1}\mathbf b. For larger problems, row reduction is often more efficient than finding an inverse, but the underlying idea is the same. Always check a solution by substituting it back into the original equations. When det⁡(A)=0\det(A)=0, the inverse method does not apply; the system may have no solution or infinitely many solutions.

Worked example: Two unknown flow rates

Two unknown flow rates xx and yy, each measured in m3/s\mathrm{m^3/s}, satisfy

2x+y=7,x+3y=11.2x+y=7,\qquad x+3y=11.

Write the system in matrix form, use the inverse of the coefficient matrix to solve it, and verify both equations.

Show the solution

Step 1: Write the matrix equation.

(2113)⏟A(xy)=(711).\underbrace{\begin{pmatrix}2&1\\1&3\end{pmatrix}}_{A}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}7\\11\end{pmatrix}.

Step 2: Check invertibility.

det⁡(A)=2(3)−1(1)=5≠0.\det(A)=2(3)-1(1)=5\ne0.

Thus an inverse exists:

A−1=15(3−1−12).A^{-1}=\frac15\begin{pmatrix}3&-1\\-1&2\end{pmatrix}.

Step 3: Multiply by the right-hand side.

(xy)=15(3−1−12)(711)=15(21−11−7+22)=(23).\begin{pmatrix}x\\y\end{pmatrix}=\frac15\begin{pmatrix}3&-1\\-1&2\end{pmatrix}\begin{pmatrix}7\\11\end{pmatrix}=\frac15\begin{pmatrix}21-11\\-7+22\end{pmatrix}=\begin{pmatrix}2\\3\end{pmatrix}.

Step 4: Verify. 2(2)+3=72(2)+3=7 and 2+3(3)=112+3(3)=11, so both original equations hold.

Answers: x=2 m3/s\boldsymbol{x=2\,\mathrm{m^3/s}} and y=3 m3/s\boldsymbol{y=3\,\mathrm{m^3/s}}.

Common mistakes

Multiplying matrices entry by entry.

Use a row-by-column dot product and check dimensions first.

Calculating the determinant as ab−cdab-cd.

For a 2×22\times2 matrix, multiply the main diagonal and subtract the other diagonal: ad−bcad-bc.

Using the inverse formula when the determinant is zero.

Check det⁡(A)≠0\det(A)\ne0 before dividing by it.

Forgetting the order when multiplying by an inverse.

Solve Ax=bA\mathbf x=\mathbf b with A−1A^{-1} on the left, then verify the equations.

Check your understanding

1. Find det⁡(4213)\det\begin{pmatrix}4&2\\1&3\end{pmatrix}.

2. Find (1201)(34)\begin{pmatrix}1&2\\0&1\end{pmatrix}\begin{pmatrix}3\\4\end{pmatrix}.

3. What does a zero determinant tell you about a square matrix?

Still not sure? Talk it through.

Waypoint Mentor's tutor explains this out loud, works through your own problems on a whiteboard, and checks you've got it. Free to start.

Explain this to me

Related topics