How do I transform a vertical line with a matrix If I have a vertical line defined as:$$x=c$$where $c$ is some constant, and I want to transform it with a matrix:$$\begin{bmatrix}m_{00} &amp; m_{01}\\m_{10} &amp; m_{11}\end{bmatrix}$$and end with a line with the format:$$y=ax+b.$$How would the math work out? I can easily see how to calculate the $a$ value, as it is just given by the right column vector of matrix's rise over run:$$a=\frac{m_{11}}{m_{01}}$$So now I'm left with the question of how to calculate b?
You would perform a rotation to get the gradient correct and then a scaling to change the y-intercept from the one you have after rotation to the desired value of b. You need to know the form of the matrix for a rotation of a given angle, a way to calculate the angle you want, then calculate where the y-intercept will end up, call it p, and know the form of a matrix to scale by a factor of b/p. Finally need to compose the matrices to get the answer in the form of a 2 x 2 matrix and be careful to do so in the correct order as matrices are not generally commutative!

Edit: As per the comment above, it will not work for c=0 as p will be zero in the above.
Just after posting i had a realization.

We know a point the old line went through $(c, 0)$. If we transform this like it was a vector, by multiplying with the matrix, it should end up a place the new line will go through. And by knowing a point it need to go through and a slope, b is given by:$$b=ax-y$$Edit: i will just crunch the algebra for any future readers:
Let $p$ be the point that the $\begin{bmatrix}c\\0\end{bmatrix}$ ends up on. That means:$$p=\begin{bmatrix}m_{00}&amp;m_{01}\\m_{10}&amp;m_{11}\end{bmatrix}\begin{bmatrix}c\\0\end{bmatrix}=\begin{bmatrix}m_{00}c\\m_{10}c\end{bmatrix}$$And then inserting the coordinates of $p$ into our equation for b we get:$$b=am_{00}c-m_{10}c$$