In what follows are various notes dealing with projection matrices.
The projection matrix is
\(P = \begin{bmatrix} \frac{2}{\text{right} - \text{left}} & 0 & 0 & -\frac{\text{right} + \text{left}}{\text{right} - \text{left}}\\ 0 & \frac{2}{\text{top} - \text{bottom}} & 0 & -\frac{\text{top} + \text{bottom}}{\text{top} - \text{bottom}}\\ 0 & 0 & \frac{2}{\text{far} - \text{near}} & -\frac{\text{far} + \text{near}}{\text{far} - \text{near}}\\ 0 & 0 & 0 & 1 \end{bmatrix}\)
which is a scaling \(S\) followed by a translation \(T\)
\(P = ST = \begin{bmatrix} \frac{2}{\text{right} - \text{left}} & 0 & 0 & 0\\ 0 & \frac{2}{\text{top} - \text{bottom}} & 0 & 0\\ 0 & 0 & \frac{2}{\text{far} - \text{near}} & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} 1 & 0 & 0 & -\frac{\text{left} + \text{right}}{2}\\ 0 & 1 & 0 & -\frac{\text{top} + \text{bottom}}{2}\\ 0 & 0 & 1 & -\frac{\text{far} + \text{near}}{2}\\ 0 & 0 & 0 & 1 \end{bmatrix}\)
The projection matrix is
\(P = \begin{bmatrix} \frac{2}{\text{right} - \text{left}} & 0 & 0 & -\frac{\text{right} + \text{left}}{\text{right} - \text{left}}\\ 0 & \frac{2}{\text{top} - \text{bottom}} & 0 & -\frac{\text{top} + \text{bottom}}{\text{top} - \text{bottom}}\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}\)
which is a scaling \(S\) followed by a translation \(T\)
\(P = ST = \begin{bmatrix} \frac{2}{\text{right} - \text{left}} & 0 & 0 & 0\\ 0 & \frac{2}{\text{top} - \text{bottom}} & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}\begin{bmatrix} 1 & 0 & 0 & -\frac{\text{left} + \text{right}}{2}\\ 0 & 1 & 0 & -\frac{\text{top} + \text{bottom}}{2}\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}\)