# Change of coordinate matrix

## Recommended Posts

How do I do what is in the picture?

I took the point * change of coordinate matrix * scale matrix but it didn't work.

[1,1,0,1] * [1 0 0 0, 0 1 0 0, 0 0 1 0, 2 2 0 1] * [2 0 0 0, 0 1 0 0, 0 0 1 0, 0 0 0 1]

this didn't work.

##### Share on other sites
alvaro    21266
You need to apply a translation to move the point (2,2) to the origin, then do the scaling, then undo the translation.

http://www.wolframalpha.com/input/?i={{1%2C0%2C2}%2C{0%2C1%2C2}%2C{0%2C0%2C1}}.{{2%2C0%2C0}%2C{0%2C1%2C0}%2C{0%2C0%2C1}}.{{1%2C0%2C-2}%2C{0%2C1%2C-2}%2C{0%2C0%2C1}}

EDIT: Sorry, I follow the convention that points and vectors are columns, not rows. Transpose everything if you wish. Edited by Álvaro

##### Share on other sites

Ok. after I multiply all these matrix with the point, will one matrix do it all for all four points of the box. or do I have to change the coordinate of the points .that is one negative x value and the other positive .

like in order to make [1,1,0]  to [4,1,0]......I use point [1,1,0]

to make [1,1,0] to [0,1,0]..I use point [-1,1,0]

##### Share on other sites
alvaro    21266
Yes, one matrix is used to transform all the points.

The matrix I provided is used in the following way: If you multiply it by the column (1,1,1) on the right, you'll get the column (0,1,1) back. Similarly, if you multiply it by the column (3,3,1), you'll get (4,3,1) back.