Elementary matrices

Matrices in the form $$\mathbf{I-uv}^T$$ where $$\mathbf{u, v}$$ are $$n\times 1$$ columns such that $$v^Tu \neq 1$$ are called 'elementary matrices'. Elementary matrices are nonsingular, and using the Woodbury formula, it can be shown that:

$$\left(\mathbf{I-uv}^T\right)^{-1} = \mathbf{I}-\frac{\mathbf{uv}^T}{\mathbf{v}^T\mathbf u-1}$$

There are three types of elementary matrices:
 * Type I: Interchanging rows (columns) $$i$$ and $$j$$
 * Type II: Multiplying row (column) $$i$$ by $$\alpha\neq 0$$
 * Type III is adding a multiple of row (column) $$i$$ to row (column) $$j$$

When applied from left, an elementary matrix does row operations (LR) and when applied from right, it applies column operations (RC)

Examples
The following are three elementary matrices corresponding to the three types listed above:

$$\mathbf E_{1}=\begin{bmatrix}0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}$$, $$\mathbf E_{2}=\begin{bmatrix}1 & 0 & 0 \\ 0 & \alpha & 0 \\ 0 & 0 & 1\end{bmatrix}$$, $$\mathbf E_{2}=\begin{bmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ \alpha & 0 & 1\end{bmatrix}$$