# Miscalculating the determinant

I am learning linear algebra and am getting stuck when trying to calculate the determinant using elementary row operations. Consider the matrix A.

$$\begin{vmatrix} 0 & 1 & 2 & 3 \\ 1 & 1 & 1 & 1 \\ -2 & -2 & 3 & 3 \\ 1 & 2 & -2 & -3 \\ \end{vmatrix}$$

According to the solution in my textbook and Matlab the determinant should be 10. I however find -20. Here is what I did. I first interchanged row 1 and row 3. $$\begin{vmatrix} 1 & 2 & -2 & -3 \\ 1 & 1 & 1 & 1 \\ -2 & -2 & 3 & 3 \\ 0 & 1 & 2 & 3 \end{vmatrix}$$

I then substracted row 1 from row two. I also added the first row twice to the third row. $$\begin{vmatrix} 1 & 2 & -2 & -3 \\ 0 & -1 & 3 & -2 \\ 0 & 2 & -1 & 9 \\ 0 & 1 & 2 & 3 \end{vmatrix}$$

Then, I added the second row twice to the third row and once to the fourth row. $$\begin{vmatrix} 1 & 2 & -2 & -3 \\ 0 & -1 & 3 & -2 \\ 0 & 0 & 5 & 5 \\ 0 & 0 & 5 & 1 \end{vmatrix}$$ My final operation was to substract the third row from the fourth row, which gave: $$\begin{vmatrix} 1 & 2 & -2 & -3 \\ 0 & -1 & 3 & -2 \\ 0 & 0 & 5 & 5 \\ 0 & 0 & 0 & -4 \end{vmatrix}$$

Finally, I calculated the determinant: $$(-1)^1 \cdot 1 \cdot -1 \cdot 5 \cdot -4 = -20$$ The $$(-1)^1$$ is there since I did one operation in which I interchanged two rows. I would really appreciate if you could tell me what I did wrong.

Martijn

• You need to check your calculations. At a glance, in the second step, $1-(-3)=4$
– user418131
Sep 28 '18 at 18:35

You have a few mistakes in calculations. In step $$2$$ when you subtract row $$1$$ from row $$2$$ it should be $$1-(-3)=4$$ in the fourth column. In the same step when you add row $$1$$ twice to row $$3$$ it should be $$3+2\times(-3)=-3$$ in the fourth column.

• Thanks, your answer made me realize that when I wrote the question in my notepad, I replaced -3 with 3. It was a stupid mistake. I appreciate your time looking at it! Sep 28 '18 at 18:45
• You're welcome. And don't worry, everybody make calculation mistakes sometimes.
– Mark
Sep 28 '18 at 18:50

Actually, the first thing that you did was to exchange rows $$1$$ and $$4$$, not $$1$$ and $$3$$. After that, when you subtracted row $$1$$ from row $$2$$, you should have got a $$4$$ at the end of the row. And when you add twice the first row to the third one, the last entry should become $$-3$$, not $$9$$.

• He didn't forget to change the sign though. He wrote about it in the end.
– Mark
Sep 28 '18 at 18:42
• @Mark I've edited my answer. Thank you. Sep 28 '18 at 18:43
• Thanks José, I made some mistakes taking over the question in my notepad. Thanks for taking the time to answer my question! Sep 28 '18 at 18:47
• @MartijnKor I'm glad I could help. Sep 28 '18 at 18:53