# Equation of a line in homogenous coordinates given 2 points in affine coordinates

So if I have 2 points $A$ and $B$ such that $F(A) = (1; a, a^3)$, and $F(B) = (1; b, b^3)$. how do I find the equation of this line in homogeneous coordinates?

So I know how to get a line the "normal" way. If I take the points $a$ and $b$ and represent them as regular Cartesian coordinates $A = (a, a^3), B = (b, b^3)$ and then say a line equation is $y = mx + b$. I could find the slope to be $(b^3-a^3)/(b-a)$ and plug that in for $m$ and then find '$b$' by plugging in the coordinates for $A$ and $B$.

But then I wouldn't know how to take that $y = mx+b$ and turn it into homogeneous coordinates. I don't think this is necessarily how I'm supposed to go about it.

-
A line expressed as $C_0 + C_1 x + C_2 y = 0$ has homogeneous coordinates $(C_0,C_1,C_2)$. –  ja72 Dec 7 '13 at 23:24

Is this what you want?

Let $P=[p_0:\cdots:p_n], Q=[q_0: \cdots :q_n] \in \mathbb{P}^n.$ Then the line $\overline{PQ}$ is $$\{[p_0 \lambda+ q_0\mu : \cdots : p_n \lambda+q_n \mu] | [\lambda: \mu] \in \mathbb{P}^1 \}$$

-
I'm not entirely sure what it is you wrote here but I'm just asking how to go about getting the equation of a line in homogeneous coordinates given two points written in projective coordinates. –  user1855952 Jan 30 '13 at 7:14

In general, to projectivize a polynomial equation $f$ in $x_1,...,x_n$, you multiply each term by the minimal appropriate power of $x_0$ so that the new equation is homogeneous. This gives you the closure in $\mathbb{P}^n$ of the original variety $f = 0$, which was originally contained in $\mathbb{A}^n$.

So, for example, if you have the line $y = mx + b$ in $\mathbb{A}^2$, the projectivization in $\mathbb{P}^2$ is given by $y = mx + bz$. By my first paragraph, the latter equation is the closure of the affine line. Thus it gives the desired homogeneous equation for the projective line.

-

In planar geometry the line passing through two points A and B in homogeneous coordinates is

$$\begin{pmatrix} C_0 \\ C_1 \\ C_2 \end{pmatrix} = \begin{pmatrix} A_0 \\ A_1 \\ A_2 \end{pmatrix} \times \begin{pmatrix} B_0 \\ B_1 \\ B_2 \end{pmatrix} = \begin{pmatrix} A_1 B_2 - A_2 B_1 \\ A_2 B_0 - A_0 B_2 \\ A_0 B_1 - A_1 B_0 \end{pmatrix}$$

The equation for the line is

$$C_0 + C_1 x + C_2 y = 0$$

## Example

Two points A and B have coordinates $A=(1,7,2)$ and $B=(1,3,-2)$. The line that joints them is

$$C = \begin{pmatrix} 1 \\ 7 \\ 2 \end{pmatrix} \times \begin{pmatrix} 1 \\ 3 \\ -2 \end{pmatrix} = \begin{pmatrix} -20 \\ 4 \\ -4 \end{pmatrix}$$

with the equation $$(-20)+(4)x+(-4)y=0 \\ x-y-5 = 0$$

-