What are the standard equations for change of Cartesian coordinates in $\mathbb{R}^2$? I'm working through the first section of Boothby's Introduction to Differentiable Manifolds, and one of the exercises reads as follows:

Using standard equations for change of Cartesian coordinates, verify that $\frac{m_2 - m_1}{1 + m_1m_2}$, where $m_1, m_2$ are the slope of two lines, is independent of the choice of coordinates.

It's mentioned that this can also be done by proving that its value is just the tangent of the angle between the two lines, but I believe the exercise isn't meant to be completed in this way.
I'm not familiar with the standard equations for change of Cartesian coordinates. It seems like a change of coordinates in $\mathbb{R}^2$ would be any affine transformation, though I'm not sure of this.
My question is: what are the standard equations for change of Cartesian coordinates?
 A: If you have two cartesian coordinate systems, $Oxy$ and $\Omega\xi\eta$, then the equation relating them is
$$
\begin{pmatrix}\xi \\ \eta \end{pmatrix}
= \begin{pmatrix}a & b \\ c & d \end{pmatrix}
\begin{pmatrix}x \\ y \end{pmatrix} 
+ \begin{pmatrix}\xi(O) \\ \eta(O) \end{pmatrix},
$$
where

*

*the matrix $\begin{pmatrix}a & b \\ c & d \end{pmatrix}$ in invertible and

*$\xi(O)$ and $\eta(O)$ are the coordinates of $O$ in the second coordinate system.

A: Since gradients are invariant under translations, we may assume without loss of generality that the two systems of Cartesian coordinates have the same origin, and each line passes through that common origin. The transformation from coordinates $x,\,y$ to coordinates $X,\,Y$ satisfies$$X=x\cos\theta-y\sin\theta,\,Y=x\sin\theta+y\cos\theta$$for some $\theta\in\Bbb R$. If $y=mx$ and $Y=nX$,$$0=x\sin\theta+mx\cos\theta-nx\cos\theta+nmx\sin\theta\implies n=\frac{m+\tan\theta}{1-m\tan\theta}.$$Finally,$$\frac{\frac{m_2+\tan\theta}{1-m_2\tan\theta}-\frac{m_1+\tan\theta}{1-m_1\tan\theta}}{1+\frac{m_1+\tan\theta}{1-m_1\tan\theta}\frac{m_2+\tan\theta}{1-m_2\tan\theta}}=\frac{\left(m_{2}-m_{1}\right)\left(1+\tan^{2}\theta\right)}{\left(1+m_{1}m_{2}\right)\left(1+\tan^{2}\theta\right)}=\frac{m_{2}-m_{1}}{1+m_{1}m_{2}}.$$In closing, it's worth noting that Boothby's request to use a change of Cartesian coordinates not only gives us more work to do than necessary, it makes the final result look like an accident. It is not. Writing $m_1=\tan\theta_1$ etc., $\frac{m_2-m_1}{1+m_1m_2}=\tan(\theta_2-\theta_1)$, so the result follows from the rotational invariance of angles in the plane.
