I am supposed to calculate the value for the determinant of this matrix. I didn't know what to do, so I looked up for the sample solution, which I don't understand.
$$\left|\begin{array}{ccc} 18 & 4 & 6\\ 9 & 2 & 3\\ 11 & 5 & 27\end{array}\right| = \left|\begin{array}{ccc} 2\cdot 9 & 2\cdot 2 & 2\cdot 3\\ 9 & 2 & 3\\ 11 & 5 & 27\end{array}\right| = 2\cdot\left|\begin{array}{ccc} 9 & 2 & 3\\ 9 & 2 & 3\\ 11 & 5 & 27\end{array}\right| = 2\cdot 0 = 0.$$
Why does the multiplication with $2$ only apply to the first row in the third matrix?
The second equality uses the fact that if you multiply a row of a square matrix $A$ by a scalar $k$ to obtain a new matrix $\hat{A}$, then $\det(\hat{A}) = k\det(A)$.
The third equality uses the fact that a square matrix with two identical rows has determinant zero.