Orthographic Projection
A projection is a dimension-reducing operation. If we apply a scale operation with $k = 0$, all the points are projected onto the perpendicular axis in 2D or the perpendicular plane in 3D of $\unit{n}$. This type of projection is called orthographic projection.
Projection on a Cardinal Axis/Plane
The simplest type of projection just discards a coordinate of the vectors transformed. E.g., in 2D, the vector $\mathbf{v} = \begin{bmatrix} v_x & v_y \end{bmatrix}^T$ projected onto the $x$-axis will discard its $y$-coordinate and make $\mathbf{v’} = \begin{bmatrix} v_x & 0 \end{bmatrix}^T$. The operation can be achieved by applying a scale transformation with $k = 0$.
$$
\mathbf{P_x} = \mathbf{S} \left (\begin{bmatrix}
0 \\ 1
\end{bmatrix}, 0 \right ) = \begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix}
$$
$$
\mathbf{P_y} = \mathbf{S} \left (\begin{bmatrix}
1 \\ 0
\end{bmatrix}, 0 \right ) = \begin{bmatrix}
0 & 0 \\
0 & 1
\end{bmatrix}
$$
When a 3D vector $v = [v_x, v_y, v_z]$ is projected onto the $xy$-plane, then the $v_z$ coordinate will be discarded by copying just $v_x$ and $v_y$, i.e., $v’ = [v_x, v_y, 0]$.
$$
\mathbf{P_{xy}} = \mathbf{S} \left (\begin{bmatrix}
0 \\ 0 \\ 1
\end{bmatrix}, 0 \right ) = \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 0
\end{bmatrix}
$$
$$
\mathbf{P_{xz}} = \mathbf{S}\left (\begin{bmatrix}
0 \\ 1 \\ 0
\end{bmatrix}, 0 \right ) = \begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 1
\end{bmatrix}
$$
$$
\mathbf{P_{yz}} = \mathbf{S} \left (\begin{bmatrix}
1 \\ 0 \\ 0
\end{bmatrix}, 0 \right ) = \begin{bmatrix}
0 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}
$$
Projection onto an Arbitrary Axis/Plane
We can apply a zero-factor scale along the direction of the vector perpendicular to the axis/plane.
In 2D:
$$
\begin{align*}
\mathbf{P(\unit{n})} = \mathbf{S}(\unit{n}, 0) &= \begin{bmatrix}
1 + (0 - 1){n_x}^2 & (0 - 1)n_xn_y \\
(0 - 1)n_xn_y & 1 + (0 - 1{n_y}^2
\end{bmatrix} \\
\\
&= \begin{bmatrix}
1 - {n_x}^2 & -n_xn_y \\
-n_xn_y & 1 - {n_y}^2
\end{bmatrix}
\end{align*}
$$
In 3D:
$$
\begin{align*}
\mathbf{P(\unit{n})} = \mathbf{S}(\unit{n}, 0) &= \begin{bmatrix}
1 + (0 - 1){n_x}^2 & (0 - 1)n_yn_x & (0 - 1)n_zn_x \\
(0 - 1)n_xn_y & 1 + (0 - 1{n_y}^2 & (0 - 1)n_zn_y \\
(0 - 1)n_xn_z & (0 - 1)n_yn_z & 1 + (0 - 1){n_z}^2
\end{bmatrix} \\
\\
&= \begin{bmatrix}
1 - {n_x}^2 & -n_yn_x & -n_zn_x \\
-n_xn_y & 1 - {n_y}^2 & -n_zn_y \\
-n_xn_z & -n_yn_z & 1 - {n_z}^2 \\
\end{bmatrix}
\end{align*}
$$