%display latex
latex.matrix_delimiters(left='[', right=']')
$\newcommand{\la}{\langle}$ $\newcommand{\ra}{\rangle}$ $\newcommand{\vu}{\mathbf{u}}$ $\newcommand{\vv}{\mathbf{v}}$ $\newcommand{\vw}{\mathbf{w}}$ $\newcommand{\vzz}{\mathbf{z}}$ $\newcommand{\nc}{\newcommand}$ $\nc{\Cc}{\mathbb{C}}$ $\nc{\Rr}{\mathbb{R}}$ $\nc{\Qq}{\mathbb{Q}}$ $\nc{\Nn}{\mathbb{N}}$ $\nc{\cB}{\mathcal{B}}$ $\nc{\cE}{\mathcal{E}}$ $\nc{\cC}{\mathcal{C}}$ $\nc{\cD}{\mathcal{D}}$ $\nc{\mi}{\mathbf{i}}$ $\nc{\span}[1]{\langle #1 \rangle}$ $\nc{\ol}[1]{\overline{#1} }$ $\nc{\norm}[1]{\left\| #1 \right\|}$ $\nc{\abs}[1]{\left| #1 \right|}$ $\nc{\vz}{\mathbf{0}}$ $\nc{\vo}{\mathbf{1}}$ $\nc{\DMO}{\DeclareMathOperator}$ $\DMO{\tr}{tr}$ $\DMO{\nullsp}{nullsp}$ $\nc{\va}{\mathbf{a}}$ $\nc{\vb}{\mathbf{b}}$ $\nc{\vx}{\mathbf{x}}$ $\nc{\ve}{\mathbf{e}}$ $\nc{\vd}{\mathbf{d}}$ $\nc{\vh}{\mathbf{h}}$ $\nc{\ds}{\displaystyle}$ $\nc{\bm}[1]{\begin{bmatrix} #1 \end{bmatrix}}$ $\nc{\gm}[2]{\bm{\mid & \cdots & \mid \\ #1 & \cdots & #2 \\ \mid & \cdots & \mid}}$ $\nc{\MN}{M_{m \times n}(K)}$ $\nc{\NM}{M_{n \times m}(K)}$ $\nc{\NP}{M_{n \times p}(K)}$ $\nc{\MP}{M_{m \times p}(K)}$ $\nc{\PN}{M_{p \times n}(K)}$ $\nc{\NN}{M_n(K)}$ $\nc{\im}{\mathrm{Im\ }}$ $\nc{\ev}{\mathrm{ev}}$ $\nc{\Hom}{\mathrm{Hom}}$ $\nc{\com}[1]{[\phantom{a}]^{#1}}$ $\nc{\rBD}[1]{ [#1]_{\cB}^{\cD}}$ $\DMO{\id}{id}$ $\DMO{\rk}{rk}$ $\DMO{\nullity}{nullity}$ $\DMO{\End}{End}$ $\DMO{\proj}{proj}$ $\nc{\GL}{\mathrm{GL}}$
The determinant function has the following properties:
$\det\begin{bmatrix} &\vdots & \\ \cdots &\mathbf{\color{blue} u} &\cdots \\ &\vdots & \\ \cdots &\mathbf{\color{red} v} &\cdots \\ &\vdots &\end{bmatrix} = (-1)\det\begin{bmatrix} &\vdots & \\ \cdots &\mathbf{\color{red} v} &\cdots \\ &\vdots & \\ \cdots &\mathbf{\color{blue} u} &\cdots \\ &\vdots &\end{bmatrix}$
$\det\begin{bmatrix} &\vdots & \\ \cdots &{\color{red} c}\ {\mathbf u} &\cdots \\ &\vdots &\end{bmatrix}= {\color{red} c}\det\begin{bmatrix} &\vdots & \\ \cdots &{\mathbf u} &\cdots \\ &\vdots &\end{bmatrix} \quad (c \in K)$
$\det\begin{bmatrix} &\vdots & \\ \cdots &{\mathbf u+ \mathbf v} &\cdots \\ &\vdots &\end{bmatrix} = \det\begin{bmatrix} &\vdots & \\ \cdots &\mathbf u &\cdots \\ &\vdots &\end{bmatrix} + \det\begin{bmatrix} &\vdots & \\ \cdots &\mathbf v &\cdots \\ &\vdots &\end{bmatrix}$
$\det I = 1$.
A consequence of these properties is:
Corollary 2. If $A'$ is obtained from $A$ by adding a multiple of a row to another, then $\det(A') = \det(A)$.
In other words, determinant of a matrix is unchanged by the 3rd type of ERO.
Theorem 4. For any $n$, there is a unique function from $M_n(K)$ to $K$ that satisfies properties (1) to (4).
Let us illustrate this theorem in the $2 \times 2$ case.
Now $\det\bm{1 & 0 \\ a& b} \stackrel{\text{Cor 2}}{=}\det\bm{1 & 0 \\ 0 & b} \stackrel{(2)}{=} b\det\bm{1 & 0 \\ 0 & 1} \stackrel{(4)}{=} b$.
Likewise, $\det\bm{a & b \\ 0 & 1} \stackrel{\text{Cor 2}}{=} \det\bm{a & 0 \\ 0 & 1} \stackrel{(2)}{=}a\det\bm{1 & 0 \\ 0 & 1} \stackrel{(4)}{=} a$.
Putting these back to the computation of $\det\bm{a & b \\ c & d}$, we get $$ \det\bm{a & b \\ c& d} = -c\det\bm{1 & 0 \\ a & b} + d\det\bm{a & b \\ 0 & 1} = -cb + da = ad-bc. $$