How do I calculate a change of coordinates given two lines as new axis?
Solution 1
Let $\bf p$ be the intersection point of the lines, and let $\bf u$ and $\bf v$ be unit direction vectors associated to the two lines. The first part of the transformation should translate $\bf p$ to $\bf 0$; so wlog assume $\bf p=0$.
We want to write $\mathbf{x}=a\mathbf{u}+b\mathbf{v}$; to do this, form the matrix $\mathrm{U}=[\bf u~v]$ (we assume vectors are column vectors), so we can write $\mathbf{x}=\mathrm{U}[a~b]^T$ and hence we solve for $a,b$ via $[a~b]^T=\mathrm{U}^{1}\bf x$. Then $\bf x$ in the old coordinates corresponds to $[a~b]^T$ in the new coordinates.
Two changesofcoordinates of the sort we want are related by a third coordinate change taking place in the second coordinates. This new coordinate change preserves the origin and two axes, and therefore is precisely a rescaling of the $a$ and $b$axes individually.
Solution 2
Let $P$ be the point $(x_3,y_3)$. Draw lines parallel to both $y=m_1x+b_1$ and $y=m_2x+b_2$ through $P$ and suppose those parallel lines meets $y=m_1x+b_1$ and $y=m_2x+b_2$ at $A$ and $B$ respectively. If $O$ is the intersection point of $y=m_1x+b_1$ and $y=m_2x+b_2$ then $(w,z)=(OB,OA)$
Solution 3
There is not enough information to convert coordinates. We are given the location of the axes, but not the coordinate scale on those axes. The $z$ and $w$ coordinates can be given by $$ \begin{align} z&=c_1(\color{#C00000}{m_1x+b_1y})\\ w&=c_2(\color{#C00000}{m_2x+b_2y}) \end{align}\tag{1} $$ for any $c_1,c_2\not=0$. Given the $(x,y)$ and $(z,w)$ for some point not on the $z$ or $w$ axes (so that we can divide by the red terms in $(1)$), we can compute $c_1$ and $c_2$, which determines the conversion $(1)$.
Related videos on Youtube
Matt Groff
Updated on August 01, 2022Comments

Matt Groff 5 months
Suppose we have an old coordinate system using the variables $x$ and $y$. We are given two equations for lines to form the axis for new coordinates. e.g. The line $z=0$ is given by the equation $y = m_1 x + b_1$, and the line $w=0$ is given by the equation $y = m_2 x + b_2$. Now suppose we are given a point $(x_3, y_3)$. What are the $w$ and $z$ coordinates of this point?

Matt Groff over 10 yearsI think that I was making this out to be harder than it is. I only have to calculate the distance from one line, i.e. $z=0$, to get the $w$ coordinate, and vice versa. I guess that's as easy as it will get.

anon over 10 yearsRe: your comment, Are the two axes necessarily perpendicular?

Matt Groff over 10 years@anon: No. I guess that distance won't work. I'm hoping for the simplest possible method.

anon over 10 yearsNote that there is actually more than one such coordinate transformation: for any such transformation, we can rescale the two coordinates afterwards, and composing the two procedures together is a different coordinate transformation. There is an obvious geometric case though: projecting points directly onto the lines, and then measuring the distance from the intersection along each line and making those two quantities the new coordinates.

rschwieb over 10 years"Change of basis" should also probably be switched for "change of coordinates", because what's described here is an alias change of coordinates in the plane. (It includes a translation, and doesn't refer to the basis of the vector space directly.)

Matt Groff over 10 yearsHmmm... If there is more than one possible solution/method, I'd like to know all possibilites. Maybe this should be a community wiki...

anon over 10 years@MattGroff I don't think it should be CW; the possibilities are easy to describe (in fact my comment provides the way to obtain all possibilities from just one possibility (assuming of course you want rectilinear coordinates)).

J. M. ain't a mathematician over 10 yearsHave you seen this?
