# How do I get a matrix from a coordinate system?

What is the matrix of the reflection at the line $y = x-2$?

How do I get the matrix at homogeneous coordinates? I don't get this question at all. I have really no idea of what I am supposed to do here or how. I did draw the line but then I don't know how to get a matrix from this information. Are there some particular steps to follow (like a cook recipe) ? Can someone explain me one step at a time? I just started with linear algebra which is why I don't know how to get this matrix.

• If you reflect over the line $y=x-2$, then $\vec{0}$ doesn't map to $\vec{0}$. So, it's not linear and would not have a matrix. – Joe Johnson 126 Apr 2 '13 at 16:57
• @JoeJohnson126 What do you mean? Are you sure there is no matrix? Because I already have the answer to this question, which is a matrix? I wanted to know how to obtain the answer as the answer itself is not important to me. – n00b1990 Apr 2 '13 at 17:52

First figure out where a point (x,y) should go. As Joe Johnson points out, this will involve a translation so this will not be linear as a transformation from $\mathbb R{^2}$ to $\mathbb R{^2}$ which is why we use homogeneous coordinates.
Suppose we determine (x,y) gets mapped to (y+a, x+b). Then we must write down the 3$\times$3 matrix that transforms (x,y,1) into (y+a, x+b, 1).