perspective projection transformation matrix
Given your equations (which i just assume are correct):
$$
\begin{align}
x_p &amp;= x \frac{z_{vp}-z_{prp}}{z-z_{prp}}+x_{prp} \frac{z-z_{vp}}{z-z_{prp}}\\
y_p &amp;= y \frac{z_{vp}-z_{prp}}{z-z_{prp}}+y_{prp} \frac{z-z_{vp}}{z-z_{prp}}
\end{align},
$$

if we take $(x_{prp}, y_{prp}, z_{prp}) = (0, 0, 0)$, then we have

$$
\begin{align}
x_p &amp;= x\frac{z_{vp}}{z}\\
y_p &amp;= y\frac{z_{vp}}{z}
\end{align}
$$

Assuming the projection plane is at distance $d$ from the origin, and, by your drawing, that the projection plane is on the negative side of the Z axis, we have $z_{vp} = -d$, which leads to

$$
\begin{align}
x_p &amp;= - x\frac{d}{z}\\
y_p &amp;= - y\frac{d}{z}
\end{align}
$$

Now we can follow the same reasoning (homogeneous coordinates) as in my answer to your other question (using column notation) to write

$$
\begin{align}
\begin{bmatrix}
x\\y\\z\\ \frac{-z}{d}
\end{bmatrix}
=
\begin{bmatrix}
1&amp;0&amp;0&amp;0\\
0&amp;1&amp;0&amp;0\\
0&amp;0&amp;1&amp;0\\
0&amp;0&amp;\frac{-1}{d}&amp;0
\end{bmatrix}
\begin{bmatrix}
x\\y\\z\\1
\end{bmatrix}
\end{align}
$$

which after the division by the last coordinate will give the projected point. Notice that because we are writing it in column notation, the perspective matrix is the transpose of the matrix in your other question. Also, the negative sign is because the camera reference frame is a right-handed one.

As for the second textbook that you are reading, I cannot understand why you would have a negative sign only in the x axis without knowing more about the camera reference frame. By the diagram you posted, there should not be a negative sign.