Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 1x3 matrix representing a point in space:


And a 3x3 matrix representing an affine 2d transformation matrix


How to I multiply the matrices so that I am given the matrix?

share|cite|improve this question
I don't understand what you mean. I happen to have some experience in computer vision. The vector $u=[x,y,1]^T$ seems homogeneous coordinates of a 2D point. Let $v=Au$ where $A$ is an affine transformation matrix. I think you can get the coordinates of the new point by multiplying a scalar factor such that the third entry of $v$ is $1$. That is $x_{new}=v(1)/v(3), y_{new}=v(2)/v(3)$. – Shiyu Mar 27 '11 at 9:02
it is a $3*1$ matrix. – amul28 Mar 27 '11 at 9:06

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.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.