# 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.

I appreciate your help.

• 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

## 1 Answer

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).

I hope that helps.

• Ok, I understand. It's actually nothing more then to find a matrix which reflects a vector over the line I gave. With that I mean that you have to give a matrix that when the vector is multiplied by this matrix you get the vector at the other side of the line. Am I right? And thank you for your help! – n00b1990 Apr 7 '13 at 21:06
• That sounds right. However, in two dimensions, a reflection across this particular line is non-linear. That's why we perform the transformation in a plane paralled to the x-y plane, namely z = 1. – John Douma Apr 7 '13 at 21:55