0
$\begingroup$

I'm trying to solve this problem about finding the right Linear Transformation $\phi: \mathbb{R^2} \rightarrow \mathbb{R^2}$ which maps a set of 3 given points $A=(x_A, y_A) \space \space B=(x_B, y_B) \space \space C=(x_C, y_C) \space$ to 3 other given points $ A'=(x_{A'}, y_{A'}) \space B'=(x_{B'}, y_{B'}) \space C'=(x_{C'}, y_{C'})$ respectively.

My first idea was to check whether 2 of those vectors were a basis for $\mathbb{R^2}$ and express the other one as a linear combination like this:

$(x',y')=\alpha(x_A,y_A)+\beta(x_B,y_B)+\gamma(x_C,y_C)$

and then I can find $\alpha, \space \beta, \space \gamma$.

I'm not sure how to proceed from here, would there be a better approach?

$\endgroup$
  • $\begingroup$ What were you planning to do with these scalars once you found them? $\endgroup$ – amd Jul 2 '18 at 19:35
1
$\begingroup$

Say you have more than two points, you can also consider for \begin{equation} T = \begin{pmatrix} T_{11} & T_{12}\\ T_{21} & T_{22} \end{pmatrix} \end{equation} the problem \begin{equation} \min_{T} \|XT-X'\|_F^2 \end{equation} with \begin{equation} X = \begin{pmatrix} x_1 & y_1\\ x_2 & y_2\\ x_3 & y_3 \end{pmatrix},\quad X' = \begin{pmatrix} x_1 '& y_1'\\ x_2' & y_2'\\ x_3' & y_3' \end{pmatrix}. \end{equation} This may look too difficult, but we have the closed-form expression for the minimizer (assuming $X$ is of sufficient rank): \begin{equation} T^{\star}=(X^{\top}X)^{-1}X^{\top}X' \end{equation} which is your desired transformation. Note that for more than two points a transformation which does the trick exactly, might simply not exist.

$\endgroup$
  • $\begingroup$ Interesting, does the transformation not exist if $(X^TX)^{-1}$ does not exist? $\endgroup$ – Brave Shine Jul 2 '18 at 20:14
  • 1
    $\begingroup$ In that case you find $T^{\star}$ indeed, but it might be the case the map $T:\mathbb{R}^2\to \mathbb{R}^2$ you are looking for does not exist. Remember, this is a least-squares approach. $\endgroup$ – WalterJ Jul 2 '18 at 20:17
1
$\begingroup$

A linear transformation $$T:\mathbb {R^2} \to \mathbb {R^2}$$ is determined by a $2\times 2$ matrix $$M = \begin {bmatrix} a &b\\c&d\end {bmatrix}$$

To find such a matrix all you need is two points on the plane with their images.

If $(x_1,y_1)$ and $(x_2, y_2)$ map to $(u_1,v_1)$ and $(u_2, v_2)$ respectively, then we solve the sustem

$$ ax_1+by_1 =u_1, cx_1+dy_1 =u_2, ax_2+by_2 =u_2, cx_2+dy_2 =v_2$$

for $a,b,c,d$ and the transformation is simply $$ T(x,y) = M\binom {x}{y}$$

$\endgroup$
  • $\begingroup$ To be precise, you need two linearly independent points and there images to completely determine the map. $\endgroup$ – amd Jul 2 '18 at 20:52
  • $\begingroup$ Correct. We need to be able to solve the system. $\endgroup$ – Mohammad Riazi-Kermani Jul 2 '18 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.