Find 2d point given 2d point and transformation matrix I have a 1x3 matrix representing a point in space:
[x]
[y]
[1]

And a 3x3 matrix representing an affine 2d transformation matrix
[a][b][c]
[d][e][f]
[g][h][i]

How to I multiply the matrices so that I am given the matrix?
[newX]
[newY]
[w]


Basic matrix multiplication works here.
$$ \begin{bmatrix} c_x \\ c_y \\ c_w \end{bmatrix} = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} $$
$$ c_x = a\, x + b\, y + c $$
$$ c_y = d\, x + e\, y + f$$
$$ c_w = g\, x + h\, y + i$$
with your new point at $(x,y) = (c_x/c_w, c_y/c_w)$
You will find examples here.
