Page 15: Points, Vectors, Co-Ordinate Systems
Spring 2026 Sample Solution
On the next page, we’ll finally get to doing things in terms of vector / linear algebra.
Unfortunately, this requires you to be familiar enough with the basics of “vector” algebra (including matrices). I am told they assume that you know it when you start the linear algebra class, so they don’t even teach it there.
Make sure that you know the following. It should be sufficient for this workbook. Knowing more linear algebra will be useful in doing computer graphics. But these basics will get you surprisingly far.
- Vectors
- Matrices
- Vector operations (scalar multiple, addition)
- Matrix vector multiplication
- Matrix multiplication (remember it is not commutative)
If you need a refresher, CS559 Tutorial: Linear Algebra for CS559 has suggestions.
Intuitions for the connection to graphics
Here are some intuitions behind the math you (hopefully) already learned.
It always bugged me that math books made a big deal of the difference between points and vectors. They’re both just a list of numbers, right? In practice, yes, they are both lists of numbers. But getting an idea of what the difference is helps develop the intuition of the coordinate system. To describe this, let me use an analogy/example: describing walking in a room. Assume that you know which way is north.
- a vector is a movement that you can make. like “2 steps north, 3 steps east”
- a point is a position. it’s a place in the room. like “the south east corner” or “the center”
Notice that a vector doesn’t say where you start or end. Just how you should move. Notice that it makes sense to do arithmetic on vectors. For example you can double the vector (if you do the movement described twice), you can add two vectors (do the first movement, then the second movement – combined into one movement). It makes less sense to do this with points (twice the center of the room?) Some operations mix the two. You can take a point and add a vector (start in the center of the room, go 2 steps north and 3 steps east). You can take two points and talk about the vector between them (the movement needed to get between the points).
Vectors as Points (and points as vectors)
We can add a vector to a point to get another point. This gives us a way to describe points. We need to have a starting point (the origin). And then we can describe other points by the vectors that take you from this origin. So, a point is just a vector with a known origin. Think about it this way: if we agree that the south east corner of the room is the origin, then 5 steps north, 6 steps east is the “middle of the room” (for the room I’m in now). Or in Madison, the capitol is the center of the coordinate system, so the computer science department is “12 blocks west” (hence the number 1210).
Coordinate Systems
Having an origin is only part of what we need to interpret a point (or vector). Notice in the descriptions we use the terms “steps north” and “steps east”. To interpret a vector, we basically need other vectors that will tell us how to interpret each of the numbers.
“One step north” and “one step east” are the building blocks from which we build more vectors. These are actually vectors themselves. So, yes, we define vectors in terms of other vectors – the story of the world being carried on the back of a turtle, who is on the back of another turtle, and it is turtles all the way down comes to mind (if you don’t know this, don’t worry about it – but I just learned from Wikipedia that it is not actually a Hindu myth).
The important point: to describe what a vector means (in 2 dimensions), we need 2 basis vectors that tell us how to interpret the two numbers. If you want to define a coordinate system (something that tells us how to interpret a point) in two dimensions, we need two basis vectors and an origin. If you have these things, then you can take pairs of numbers (2-vectors, or coordinates) and interpret them as points/positions or vectors. So, if we agree that the origin is the south-west corner of the room, and our basis vectors are a step north and a step east, you can interpret (3,5) as a position: it’s the place you get to if you start at the origin and take 3 steps north and 5 steps east.
Or, to give a more practical example… If we agree that the origin is the top left corner of the page/screen, that the first basis vector is one pixel down, and the second basis vector is one pixel to the right, then pairs of numbers like (40,75) tell us positions on the page/screen.
Getting to know your bases
For the screen, this might be overkill. We know to start at the top left, have x count pixels to the right, and y count pixels down. However, understanding these concepts is really important because it will help us generalize to other bases and coordinate systems.
A quick idea of where this is going… You could imagine that there are lots of possible bases. Above, I gave one for the screen, but I could have picked another one equally well (say, the origin is the center, and the first basis vector is from the center to the right edge, and the second basis vector is from the center to the top edge). If we’re going to talk about positions, we’ll need to know what basis we’re in. We’ll want to be able to use whatever basis is useful, and transition between them. And this is the basis (pardon the pun) of linear algebra. Notice how we took a geometric problem (describing places and movements) and translated it into a math problem (multiplying and adding lists of numbers). Next we’ll need to think about bases and spaces a bunch more. But I’ll put that on a separate page.
More notational sloppiness: rows and columns
In a linear algebra class, they make a big difference between row vectors and column vectors. What’s the big difference? They are both lists of numbers!
Actually, when doing math, there is a difference. It’s kind of like using types when programming. Knowing what “type” something is tells you what you can, and can’t do with it. If you work in a strictly-typed programming language, the type checker can help you determine what you can, and cannot, do with an object.
With linear algebra, a row vector is a different “type” than a column vector. You can do different things with them: you can left multiply a row vector by a matrix, you can right-multiply a matrix by a column vector. There is an equivalent to a “type cast” - we can transpose the vector.
In class, I will be sloppy. When I say vector, I (usually) will not distinguish if it is a row vector or a column vector. You should be able to infer which direction it goes by context, and transpose it if you care to have things be “correct” for your Linear Algebra professor.
So, if I write x M, you should read that as “left multiply the vector x by the matrix M. If you think “it must be a row vector” or “it’s a column vector, so it must be transposed”, your linear algebra teacher will be proud.
There is a catch for this… x M (or to be more careful) is different than M x. If the matrix M is designed to be a transform when right multiplied, it will do the wrong thing if it is used with left multiply!
In class, we will use the convention (explained on the next page) that matrices for transformations are applied to points using right multiply.
We actually won’t see very much left multiplication of a vector in class, so this confusion won’t be such a big deal. In fact, in this workbook, it might have been safer for me to say “in this workbook, all vectors are column vectors”.
Read About It In A Book
Resources for learning the math are given at CS559 Tutorial: Linear Algebra for CS559.
But, hopefully you are ready to apply these concepts to transformations on Next: Page 16 - Transformations with Linear Algebra.