Ma · Mathematics

How to Calculate a Determinant by First-Row Cofactor Expansion

Updated 13 October 2026

At a glance

  1. 1. Check the matrix

    Confirm the matrix is square and identify its first-row entries.

  2. 2. Find each minor

    For each first-row entry, delete its row and column and calculate the remaining determinant.

  3. 3. Apply the signs

    Use alternating signs: plus, minus, plus, and continue.

  4. 4. Add the terms

    Multiply each entry by its signed minor, then sum the results.

Try it: Matrix calculator

Cofactor expansion computes a determinant by reducing it to smaller determinants. Expanding along the first row means pairing each entry in that row with the determinant of the matrix left after deleting its row and column, then applying an alternating sign.

No matrix entries were provided with this question, so there is no particular determinant to evaluate. The formula and worked example below show how to do the calculation once you have the matrix.

The first-row expansion formula

For an n×nn\times n matrix A=(aij)A=(a_{ij}), let M1jM_{1j} be the minor formed by deleting row 1 and column jj. The cofactor expansion along the first row is

det⁡(A)=∑j=1n(−1)1+ja1jdet⁡(M1j).\det(A)=\sum_{j=1}^{n}(-1)^{1+j}a_{1j}\det(M_{1j}).

The factor (−1)1+j(-1)^{1+j} supplies the sign. Across the first row, the signs alternate:

+−+−⋯+\quad -\quad +\quad -\quad \cdots

A minor is a smaller matrix, while its determinant is a number. The cofactor for entry a1ja_{1j} is the signed number (−1)1+jdet⁡(M1j)(-1)^{1+j}\det(M_{1j}). Thus, each term in the expansion is the original entry multiplied by its cofactor.

For a 3×33\times3 matrix, this gives the familiar formula

∣abcdefghi∣=a∣efhi∣−b∣dfgi∣+c∣degh∣.\begin{vmatrix} a&b&c\\ d&e&f\\ g&h&i \end{vmatrix} =a\begin{vmatrix}e&f\\h&i\end{vmatrix} -b\begin{vmatrix}d&f\\g&i\end{vmatrix} +c\begin{vmatrix}d&e\\g&h\end{vmatrix}.

The middle term has a minus sign because its entry is in column 2. For any 2×22\times2 matrix, use ∣pqrs∣=ps−qr\begin{vmatrix}p&q\\r&s\end{vmatrix}=ps-qr.

Worked example

Calculate the determinant of

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

by expanding along its first row. Its first-row entries are 11, 22, and 33, with signs ++, −-, and ++. Delete row 1 and the corresponding column to find each minor:

det⁡(A)=1∣4506∣−2∣0516∣+3∣0410∣=1(4⋅6−5⋅0)−2(0⋅6−5⋅1)+3(0⋅0−4⋅1)=24−2(−5)+3(−4)=24+10−12=22.\begin{aligned} \det(A) &=1\begin{vmatrix}4&5\\0&6\end{vmatrix} -2\begin{vmatrix}0&5\\1&6\end{vmatrix} +3\begin{vmatrix}0&4\\1&0\end{vmatrix}\\ &=1(4\cdot6-5\cdot0)-2(0\cdot6-5\cdot1)+3(0\cdot0-4\cdot1)\\ &=24-2(-5)+3(-4)\\ &=24+10-12\\ &=22. \end{aligned}

The determinant is 2222. Notice that the second minor has determinant −5-5. The expansion already places a minus sign before that term, so its contribution is −2(−5)=10-2(-5)=10.

A step-by-step method

  1. Check that the matrix is square. A determinant is defined for square matrices.
  2. Copy the first-row entries in order. For an n×nn\times n matrix, these are a11,a12,…,a1na_{11},a_{12},\ldots,a_{1n}.
  3. Find each minor determinant. For the entry in column jj, cross out the first row and column jj, then calculate the determinant of what remains.
  4. Apply the alternating sign. Use plus for column 1, minus for column 2, plus for column 3, and so on.
  5. Multiply and add. Multiply each original entry by its signed minor determinant, then sum all the terms.

For a 4×44\times4 matrix, each first-row minor is a 3×33\times3 matrix. You can calculate those smaller determinants with another cofactor expansion, or use a more efficient method if the matrices become large.

Common mistakes

  • Forgetting the alternating signs. The expansion is not a sum of all positive entry-times-minor terms. The first-row signs are +,−,+,−,…+,-,+,-,\ldots.
  • Deleting the wrong column. The minor paired with an entry in column jj is made by deleting column jj, as well as the first row.
  • Using a minor instead of its determinant. The minor is a matrix; the expansion uses the determinant of that smaller matrix.
  • Losing a negative sign inside a minor. Calculate each smaller determinant carefully before applying the outer sign. A negative minor combined with an outer minus sign produces a positive term.
  • Expanding along a row that makes the work longer. You may expand along any row or column, not just the first. Choose one with zeros when possible; terms for zero entries vanish. The determinant is unchanged by which row or column you choose, provided each entry gets the correct cofactor sign.

If you supply the matrix entries, the same steps give its specific determinant.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.