In most 3D graphics pipelines (e.g., OpenGL) points and direction vectors are represented with 4D homogeneous points
(x, y, z, w) and their respective transformations are stored as 4x4 matrices. We can use the same representations for 2D and treat the z-value as the "stacking order" of our 2D shapes.
For example, for a 2D CW rotation about the origin we can use a 3D rotation about the z-axis:
| cos(angle) -sin(angle) 0 0 |
M = | sin(angle) cos(angle) 0 0 |
| 0 0 1 0 |
| 0 0 0 1 |
So to rotate a 2D point (x,y) about the origin we simply compute
M * [x, y, 0, 1]^T
With 2D geometry we simply perform a orthographic projection into the rectangular region we wish to view. The pipeline is already designed to sort objects by their z-value for hidden-surface removal so defining a stacking order of 2D objects is trivial with the machinery in place.
Making the jump to 3D is a matter of generalizing the geometry and transformations with the added dimension. All of the usual affine transformations (rotation, scale, translation, shear, ...) generalize in a very simple way.
The biggest new concepts in 3D is setting up a virtual camera (defined by a simple affine view matrix) and you now have to project your 3D geometry down to 2D to create an image -- this can be done using parallel or perspective projections. Perspective projections require perspective foreshortening based on distance from the camera -- we can make very clever use of the homogeneous representation and a division by z to pull this off. This is standard material for most introductory graphics textbooks / courses.
Anyway, there's a start....