I read the response here:
What does the graphics card do with the fourth element of a vector as the final position?
"The fourth component is a trick to keep track of perspective projection. When you do a perspective projection, you want to divide by z: x' = x/z, y' = y/z, but this isn't an operation that can be implemented by a 3x3 matrix operating on a vector of x, y, z. The trick that has become standard for doing this is to append a fourth coordinate, w, and declare that x, y, z will always be divided by w after all transformations are applied and before rasterization. "
but I didn't understand why couldn't we divide by z using a 3x3 matrix?
can't we just multiply by
1/z 0 0
0 1/z 0
0 0 1/z
to get [x/z y/z 1]
?