# What am I doing wrong in calculating this determinant?

I have matrix:

$$A = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 3 & 3 & 3 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{bmatrix}$$

And I want to calculate $\det{A}$, so I have written:

$$\begin{array}{|cccc|ccc} 1 & 2 & 3 & 4 & 1 & 2 & 3 \\ 2 & 3 & 3 & 3 & 2 & 3 & 3 \\ 0 & 1 & 2 & 3 & 0 & 1 & 2 \\ 0 & 0 & 1 & 2 & 0 & 0 & 1 \end{array}$$

From this I get that:

$$\det{A} = (1 \cdot 3 \cdot 2 \cdot 2 + 2 \cdot 3 \cdot 3 \cdot 0 + 3 \cdot 3 \cdot 0 \cdot 0 + 4 \cdot 2 \cdot 1 \cdot 1) - (3 \cdot 3 \cdot 0 \cdot 2 + 2 \cdot 2 \cdot 3 \cdot 1 + 1 \cdot 3 \cdot 2 \cdot 0 + 4 \cdot 3 \cdot 1 \cdot 0) = (12 + 0 + 0 + 8) - (0 + 12 + 0 + 0) = 8$$

But WolframAlpha is saying that it is equal 0. So my question is where am I wrong?

-

## 5 Answers

Sarrus's rule works only for $3\times 3$-determinants. So you have to find another way to compute $\det A$, for example you can apply elementary transformations not changing the determinant, that is e. g. adding the multiple of one row to another: \begin{align*} \det \begin{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 3 & 3 & 3 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{bmatrix} &= \det \begin{bmatrix} 1 & 2 & 3 & 4 \\ 0 & -1 & -3 & -5 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{bmatrix}\\ &= \det \begin{bmatrix} 1 & 2 & 3 & 4 \\ 0 & -1 & -3 & -5 \\ 0 & 0 & -1 & -2 \\ 0 & 0 & 1 & 2 \end{bmatrix}\\ &= \det \begin{bmatrix} 1 & 2 & 3 & 4 \\ 0 & -1 & -3 & -5 \\ 0 & 0 & -1 & -2 \\ 0 & 0 & 0 & 0 \end{bmatrix} \end{align*} To compute the determinant of a triagonal matrix, we just have to multiply the diagonal elements, so $$\det A = \det \begin{bmatrix} 1 & 2 & 3 & 4 \\ 0 & -1 & -3 & -5 \\ 0 & 0 & -1 & -2 \\ 0 & 0 & 0 & 0 \end{bmatrix} = 1 \cdot (-1)^2 \cdot 0 = 0.$$

-

The trick you are applying (Rule of Sarrus) only works for $3\times 3$ Matrices.

-

$$A = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 3 & 3 & 3 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{bmatrix}$$ $$P_1A = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 0 & -1 & -3 & -5 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{bmatrix}$$ $$P_2P_1A = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 0 & -1 & -3 & -5 \\ 0 & 0 & -1 & -2 \\ 0 & 0 & 1 & 2 \end{bmatrix}$$ $$P_3P_2P_1A = \begin{bmatrix} 1 & 2 & 3 & 4 \\ 0 & -1 & -3 & -5 \\ 0 & 0 & -1 & -2 \\ 0 & 0 & 0 & 0 \end{bmatrix}$$

$$\det(P_3P_2P_1A)=\det(P_3).\det(P_2).\det(P_1).\det(A)=0$$ $$\det(P_3)\neq0,\det(P_2)\neq0,\det(P_1)\neq0$$ $$\implies \det(A)=0$$

-

The method that you're using works just fine for $3\times 3$ matrices, but fails to work with $n\times n$ matrices for other $n$. You're going to have to do it another way.

For example, expanding the deteriminant along the first column, we find that \begin{align}\det A &=1\cdot\det\left[\begin{array}{ccc}3 & 3 & 3\\1 & 2 & 3\\0 & 1 & 2\end{array}\right]-2\cdot\det\left[\begin{array}{ccc}2 & 3 & 4\\1 & 2 & 3\\0 & 1 & 2\end{array}\right]+0\cdot\det\left[\begin{array}{ccc}3 & 3 & 3\\2 & 3 & 4\\0 & 1 & 2\end{array}\right]-0\cdot\det\left[\begin{array}{ccc}3 & 3 & 3\\2 & 3 & 4\\1 & 2 & 3\end{array}\right]\\ &= \det\left[\begin{array}{ccc}3 & 3 & 3\\1 & 2 & 3\\0 & 1 & 2\end{array}\right]-2\det\left[\begin{array}{ccc}2 & 3 & 4\\1 & 2 & 3\\0 & 1 & 2\end{array}\right].\end{align}

At that point, you can use your method of calculating determinants of $3\times 3$ matrices to get the rest of the way.

-

The others have pointed out what's wrong with your solution. Let's calculate the determinant now: \begin{align*} \det \begin{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 3 & 3 & 3 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{bmatrix} &\stackrel{r1 - \frac12(r2+r3+r4)}{=} \det \begin{bmatrix} 0 & 0 & 0 & 0 \\ 2 & 3 & 3 & 3 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{bmatrix} = 0. \end{align*}

-