system
Given the following post, respond as if you're commenting on Reddit:
human
How do computers transform 3D models using matrices?

I know that computers store the vertices of a 3D model. However, are they stored as vectors in 3-space or 4-space? I have seen texts showing 3D transformations using 4x4 matrices but I don't understand what advantage will it have over just using 3x3 matrices (what's the advantage of using matrices anyway, aren't there other methods of transforming objects?).
gpt
The difference is that with 3x3 matrices you can't do translation. With a matrix you basically do a weighted sum over the elements in your vertex. If you wanted to translate your vertex, say the adding the vertex (0, 1, 0) to your base vertex (0, 0, 0). It is impossible to do this with a normal 3x3 matrix since all values will be multiplied by 0.

So what is done is adding a 4th dimension which is set to 1. Any translation you want to do can just be placed in the fourth column of your transformation matrix. The base vertex would now be (0, 0, 0, 1), and the translation can be accomplished by the matrix:

&#x200B;

|0|0|0|0|
|:-|:-|:-|:-|
|0|0|0|1|
|0|0|0|0|
|0|0|0|1|