I am having difficulties with a calculation (and its given solution according to the textbook authors). The problem is from "Algebraic Geometry: A Problem Solving Approach" by Garrity et al. In the published edition, Exercise 1.9.6, it says the following:
Consider the crossing lines
$$(a_1 x + b_1 y + c_1 z)(a_2 x + b_2 y + c_2 z) = 0,$$
with
$$\text{det} \pmatrix{a_1 \ b_1 \\ a_2 \ b_2} \neq 0.$$
Find a projective change of coordinates from $xyz$-space to $uvw$-space so that the crossing lines become
$$uv = 0$$
My calculation attempts
We want to find a matrix $M$ such that:
$$M \pmatrix{u \\ v\\w} = \pmatrix{x \\ y \\z}.$$
Writing the first row's multiplication out with $u = a_1 x + b_1 y + c_1 z$ and $v = a_2 x + b_2 y + c_3 z$ gives, and choosing $w = z$ (this choice is where I am the least confident... I am just trying to simplify things to see if I can get a transformation that works) to see if I can simplify gives:
$$m_{11}u + m_{12}v + m_{13}w = x$$ $$\rightarrow m_{11}(a_1 x + b_1 y + c_1 z) + m_{12}(a_2 x + b_2 y + c_3 z) + m_{13}z = x$$ $$\rightarrow (m_{11}a_1 + m_{12}a_2)x + (m_{11}b_1 + m_{12}b_2)y + (m_{11}c_1 + m_{12}c_2 + m_{13})z = x$$ Equating each coefficient: $$m_{11}a_1 + m_{12}a_2 = 1$$ $$m_{11}b_1 + m_{12}b_2 = 0$$ $$m_{11}c_1 + m_{12}c_2 + m_{13} = 0$$
Solving the second equation for $m_{11}$: $$m_{11} = \frac{-b_2}{b_1}m_{12}$$
Plugging this into the first equation gives a solution for $m_{12}$: $$\left(\frac{-b_2}{b_1}m_{12}\right)a_1 + m_{12}a_2 = 1$$ $$\rightarrow m_{12}\left(\frac{-b_2}{b_1}a_1 + a_2\right) = 1$$ $$\rightarrow m_{12} = \frac{1}{\frac{-b_2}{b_1}a_1 + a_2}$$ $$\rightarrow m_{12} = \frac{b_1}{{-b_2}a_1 + a_2 b_1}$$ $$\rightarrow m_{12} = \frac{-b_1}{a_1 b_2 - a_2 b_1}$$ $$\rightarrow m_{12} = \frac{-b_1}{d}$$
Where $d =\text{det} \pmatrix{a_1 \ b_1 \\ a_2 \ b_2} \neq 0.$ Continuing, solving for $m_{11}$ gives:
$$m_{11} = \frac{-b_2}{b_1}m_{12} = \frac{-b_2}{b_1}\frac{-b_1}{d} = \frac{b_2}{d}$$
Plugging these into the third equation to solve for $m_{13}$:
$$m_{13} = -m_{12}c_2 - m_{11}c_1 = \frac{b_1 c_2}{d} - \frac{b_2 c_1}{d} = \frac{1}{d}(b_1 c_2 - b_2 c_1)$$
The case is symmetrical for the second row, and the third row yields $m_{33} = 1$, the rest of the entires zero, for a matrix of:
$$ M =\frac{1}{d} \begin{pmatrix} \begin{array}{rrr} b_2 & -b_1 & b_1 c_2 - b_2 c_1 \\ -a_2 & a_1 & a_2 c_1 - a_1 c_2 \\ 0 & 0 & d \end{array} \end{pmatrix} $$
Authors' Solution However, the authors give a different solution, which goes:
We want to find a matrix $M$ such that
$$M \pmatrix{u \\ v \\ w} = \pmatrix{x \\ y \\ w}$$
gives $a_1x + b_1 y + c_1z = u$ and $a_2 x + b_2 y + c_2 z = v$ with this change of variables. if you write this out you'll see this amounts to solving 3 systems of 2 equations each. If $d = \text{det} \pmatrix{a_1 \ b_1 \\ a_2 \ b_2}$ we find
$$ M =\frac{1}{d} \begin{pmatrix} \begin{array}{rrr} b_2 - c_1 b_2 + b_1 c_2 & -b_1 - c_1 b_2 + b_1 c_2 & b_1 c_2 - b_2 c_1 \\ -a_2 - c_2 a_1 + a_2 c_1 & a_1 - c_2 a_1 + a_2 c_1 & a_2 c_1 - a_1 c_2 \\ d & d & d \end{array} \end{pmatrix} $$
They don't elaborate any further on how they got this solution. Their bottom row seems to imply a choice of $z = u + v + w$. I am confused as to how they got their solution, even though their solution has features that are similar to the end result of my calculation. I would like to know
- Is my solution a valid solution to the problem?
- How did the authors obtain their solution, in detail?
Thanks.
Your solution
Putting your solution for M through Pari/GP gives: $x=\frac{b_2u-b_1v+(b_1c_2-b_2c_1)w}{d}$, $y=\frac{-a_2u+a_1v+(a_2c_1-a_1c_2)w}{d}$, $z=w$ and confirms that $L_1=a_1x+b_1y+c_1z=u$ and $L_2=a_2x+b_2y+c_2z=v$ as expected, so your solution certainly seems correct.
We can also reach your solution using the language of matrices. Write the required constraints $a_1x + b_1 y + c_1z = u$ and $a_2 x + b_2 y + c_2 z = v$, plus your choice that $w=z$, in matrix form:
$$ \begin{pmatrix} \begin{array}{c} u\\v\\w\end{array} \end{pmatrix}= \begin{pmatrix} \begin{array}{rrr} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ 0&0&1 \end{array} \end{pmatrix} \begin{pmatrix} \begin{array}{rrr}x\\y\\z \end{array} \end{pmatrix}\quad\text{Or, writing $A=\begin{pmatrix} \begin{array}{rrr} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ 0&0&1 \end{array} \end{pmatrix}~$,}\quad\begin{pmatrix} \begin{array}{c} u\\v\\w\end{array} \end{pmatrix}=A\begin{pmatrix} \begin{array}{rrr}x\\y\\z \end{array} \end{pmatrix} $$
We see $\det A =\det\pmatrix{a_1 & b_1 \\ a_2 & b_2}$, and we are given that $\det\pmatrix{a_1 & b_1 \\ a_2 & b_2}\ne 0$, so $A$ is a projective change of coordinates.
Then multiplying both sides by $A^{-1}$ gives $\quad A^{-1}\begin{pmatrix} \begin{array}{c} u\\v\\w\end{array} \end{pmatrix}=\begin{pmatrix} \begin{array}{rrr}x\\y\\z \end{array} \end{pmatrix}\quad$ so we see immediately that the matrix $M$ we're seeking in your solution is $M=A^{-1}$, which works out exactly as you calculated.
The Authors' solution
I do not understand the authors' solution. Their equation $M\pmatrix{u\\v\\w}=\pmatrix{x\\y\\{\color{red}w}}$ doesn't make sense to me as a change of coordinates. Assuming it was a typo and they meant $M\pmatrix{u\\v\\w}=\pmatrix{x\\y\\{\color{red}z}}$, we can invert their solution (using Pari/GP so avoid the tedious algebra) and write their starting assumptions as:
$$\begin{pmatrix} \begin{array}{c} u\\v\\w\end{array} \end{pmatrix}= \begin{pmatrix} \begin{array}{rrr} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ -a_1-a_2&-b_1-b_2&1-c_1-c_2 \end{array} \end{pmatrix} \begin{pmatrix} \begin{array}{rrr}x\\y\\z \end{array} \end{pmatrix}$$
So they've made the choice, that $w=z-(a_1x+b_1y+c_1z)-(a_2x+b_2y+c_2z)=z-u-v$, or $z=u+v+w$ as you correctly observe. Why? I have no idea. But once that choice is made, getting to the matrix $M$ is just a matter of solving the equations or (equivalently) inverting the matrix.
What's less obvious is how they've used the given property that $\det\pmatrix{a_1 & b_1 \\ a_2 & b_2}\ne 0$. See the notes in the general solution below.
General solution
Elementary row operations (EROs) do not change the determinant of a matrix. We can take your assumption matrix $A$, which clearly has the property $\det A\ne0$ given $\det\pmatrix{a_1 & b_1 \\ a_2 & b_2}\ne 0$, and apply the row operation $\text{row}3\leftarrow\text{row}3+k_1\text{row}1+k_2\text{row2}$ to get a general assumption matrix
$$\begin{pmatrix} \begin{array}{c} u\\v\\w\end{array} \end{pmatrix}= \begin{pmatrix} \begin{array}{rrr} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ k_1a_1+k_2a_2&k_1b_1+k_2b_2&1+k_1c_1+k_2c_2 \end{array} \end{pmatrix} \begin{pmatrix} \begin{array}{rrr}x\\y\\z \end{array} \end{pmatrix}$$
with $w=z+k_1u+k_2v$. This gives the general solution $$ M =\frac{1}{d} \begin{pmatrix} \begin{array}{rrr} b_2 - k_1(b_1 c_2 - b_2 c_1) & -b_1 -k_2(b_1 c_2 - b_2 c_1) & b_1 c_2 - b_2 c_1 \\ -a_2 - k_1(a_2 c_1 - a_1 c_2) & a_1 -k_2 (a_2 c_1 - a_1 c_2) & a_2 c_1 - a_1 c_2 \\ -k_1d & -k_2d & d \end{array} \end{pmatrix} $$
So there are an infinite number of solutions. The authors' assumption matrix corresponds to choosing $k_1=k_2=-1$. Yours corresponds to $k_1=k_2=0$.