# $\det(EB)=\det(E)\det(B)$?

I was doing a proof from my book and I had a question regarding a step.

Proof:

$$I\to E$$ (Row switch)

$$-\det I=\det E$$

$$\det E=-1$$

$$\det(EB)=\det(-1\cdot B) =\mathbf{-1\det B}$$

In the last step of the proof(in bold), how was $$-1$$ taken out of the determinant?

Isn't $$\det(n\cdot B)$$ not equal to $$n\det(B)$$ where $$n$$ is a number?

I can't really follow the working properly as presented, but you're right to be sceptical of the last step. In general, $$\det(kM) = k^n \det(M)$$, where $$M$$ is an $$n \times n$$ matrix. If $$n$$ is odd, (e.g. a $$3 \times 3$$ matrix), then this would be valid, as $$(-1)^n = -1$$ when $$n$$ is odd, but my suspicion is that the last step is a typo.
the middle part is not correct. It must be: $$|EB|=|E|\cdot |B|=-1\cdot |B|,$$ because $$E$$ is an elementary matrix, not a scalar.
I don't think $$\det (EB) = \det (-B)$$ is correct, because $$E$$ only swaps two rows, not the multiplication by $$-1$$. Specifically the first $$=$$ on the "last step" is not correct, and the boldface part is not correct either.