rotate vector around a point using matrices Im trying to rotate a vector around a point.
For this example lets say i want to rotate 30 degrees around point 2,3
I learned that it takes 3 steps
1. move vector using a "move matrix".
so the matrix would  look like:
(matrix 1)
$$
\begin{bmatrix}1&0&2\\ 0&1&3\\ 0&0&1\end{bmatrix}.
$$
2. rotate using a rotation matrix
$$
\begin{bmatrix}
\cos 30& -\sin 30& 0\\
\sin 30& \cos 30& 0\\
0& 0& 1
\end{bmatrix}=\begin{bmatrix}
.866& -.5& 0\\
.5& .866& 0\\
0& 0& 1
\end{bmatrix}
$$
 3. move back using a "move matrix" (same as matrix one using negative values for x and y):
(matrix 3)
$$
\begin{bmatrix}1&0&-2\\ 0&1&-3\\ 0&0&1\end{bmatrix}.
$$
But I don't understand how I should do these steps.
Should I multipy matrix one with matrix two, the result of this with matrix 3 and the result of that with my input, or the input with the result?
Or should I take my input, multiply with matrix 1, multiply the result with matrix 2 and after that multiply that result with matrix 3? I understand the steps but im not sure how to use these steps (if that makes sense).
edit:
lets call my input i
$$
\begin{bmatrix}x\\ y\\ 1\end{bmatrix}.
$$
should I do
$$
   m1 * m2 * m3*  i
$$
or
$$
i * m1 * m2 * m3
$$
or
$$
(i * m1)   * (i * m2) * (i * m3)
$$
If anyone is able to find a link to a solved transformation that would be incredible helpfull, that way I can check if im doing it correctly.
 A: What you want to do is write your vector as 
$$
\begin{bmatrix}x\\ y\\ 1\end{bmatrix}.
$$
Then you apply the three matrices one after the other (it doesn't matter if you apply them one by one, or if you apply them to the resulting vector; the only important thing is that you respect the order: first goes right). 
So you want to calculate 
$$
\begin{bmatrix}1&0&2\\ 0&1&3\\ 0&0&1\end{bmatrix}.
\begin{bmatrix}
\cos 30& -\sin 30& 0\\
\sin 30& \cos 30& 0\\
0& 0& 1
\end{bmatrix}
\begin{bmatrix}1&0&-2\\ 0&1&-3\\ 0&0&1\end{bmatrix}.
\begin{bmatrix}x\\ y\\ 1\end{bmatrix}.
$$
The order is the opposite you wrote, but you need to apply first the subtraction of $(2,3)$ to move things to the origin, then rotate, and then move back to $(2,3)$. 
A: Matrix operations are linear and translation is not. I can't understand why you use moving matrix (go to 3-d spaces for something like that).
Anyway if you have to do something like that: The Doug M. answer is correct.
$\begin{bmatrix}x'\\ y'\\ 1\end{bmatrix}=
\begin{bmatrix}1&0&2\\ 0&1&3\\ 0&0&1\end{bmatrix}
\begin{bmatrix}
\cos 30& -\sin 30& 0\\
\sin 30& \cos 30& 0\\
0& 0& 1
\end{bmatrix}
\begin{bmatrix}1&0&-2\\ 0&1&-3\\ 0&0&1\end{bmatrix}
\begin{bmatrix}x\\ y\\ 1\end{bmatrix}$
The order of opperations is irrelebant: matrix multiplication is associative.
