# 2D projective space ###### tags: `cvdl2020` ## Homogeneous representation of lines A line in plane is represented by an equation such as $ax+by+c=0$, different choice of a, b, c giving rise to different lines. Thus, a line may naturally be represented by the vector $(a,b,c)^T$ Notice that the correspondence between lines and vectors $(a,b,c)^T$ isn't one-to-one, since the line $ax+by+c=0$ and $(ka)x+(kb)y+(kc)=0$ are the same $\forall k \in R, k \neq 0$. So $(a,b,c)^T$ and $k(a,b,c)^T$ represent the same line. An equivalence class of vectors under this equivalence relationship is known as a **homogeneous vector**. Any paticular vector $(a,b,c)^T$ is a representative of the **equivalence class**. The set of equivalence classes of vectors in $\{R^3 - (0,0,0)^T\}$ (point zero excluede) forms the **2D projective space $P^2$** $$P^2 =R^3 - (0,0,0)$$ ## Homogeneous representation of points A point $x=(x,y)^T$ lies on the line $l=(a,b,c)^T$ if and only if $ax+by+c=0$. This may be written in terms of an innter product of vectors representing the points as $(x,y,1) \ (a,b,c)^T=(x,y,1) \ l = 0$. That is, the point $(x,y)^T$ in $R^2$ is represented as a 3-vector by adding the final coordinate of 1. :::info $(x,y)^T \in R^2$ can be transformed into $(x,y,1) \in P^2$ ::: Note that for any non-zero constant $k$ and line $l$ the equation $(kx,ky,k) \ l = 0$ if and only if $(x,y,1)l=0$. It's natural to consider the set of vectors $(kx,ky,k)^T$ for various k to be a representation of point $(x,y)^T$ in $R^2$. Thuss, just like lines, points are represented by homogeneous vectors. :::info Any arbitrary homogeneous vector $x=(x_1, x_2, x_3)^T$ in $P^2$ represents the point $(\frac{x_1}{x_3}, \frac{x_2}{x_3},x_3)^T$ in $R^2$ ::: :::success Axiom: The point $x$ lies on the line $l$ if and only if $x^Tl=0$ ::: Note that the expression $x^Tl$ is just the inner product of two vectors $x$ and $l$. Also, $x^Tl=l^Tx=x.l$ are the same expression. :::success Axiom: The intersection of two lines $l$ and $l'$ is the point $x=l \times l'$ ::: Given two lines $l=(a,b,c)^T$ and $l'=(a',b',c')^T$, we wish to find their intersection. Define the vector $x=l \times l'$ where $\times$ means vector cross product. From the triple scalar product identity $l \cdot (l \times l') = l \cdot (l \times l') =0$, we see that $l^Tx=l'^Tx=0$. Thus, if x is thought of as a point, then $x=l \times l'$ lies on both lines $l$ and $l'$, and hence is the intersection of the two lines. :::success Axiom: The line through two points $x$ and $x'$ is $l=x \times x'$ ::: Notice that line and points have similar representation in $P^2$. So given $l=x \times x'$, it's obvious that $x \cdot l = x \cdot (x \times x') =0$ so $x$ lies on $l$. Similarily for $x'$, we can concludes that $x$ and $x'$ both lies on $l$. ## Ideal points and the line at infinity Consider two lines $ax+by+c=0$ and $ax+by+c'=0$. There're represented by vectors $l=(a,b,c)^T$ and $l'=(a,b,c')^T$ where the first two coordinates are the same. Computing the intersection of two lines gives no difficulty, the intersection is $l \times l'$ $$l \times l' = \begin{vmatrix} i & j & k \\ a & b & c \\ a & b & c' \\ \end{vmatrix} = \begin{pmatrix} bc'-bc \\ ac-ac'\\ 0 \\ \end{pmatrix} = (bc'-bc, ac-ac', 0) = (c-c')(b,-a,0) $$ Ignoring the scale factor $(c-c')$, this is the point $(b,-a,0)^T$ which makes no sense when changing it back to inhomogeneous coordinate $(b/0, -a/0)^T$. However, one can define that the point of intersection has infinitely large coordinate. :::info Points with homogeneous coordinates $(x,y,0)^T$ do not correspond to any finite poin in $R^2$. This observation agrees with the usual idea that **parallel lines meet at infinity** ::: In our case, $ax+by+c=0$ and $ax+by+c'=0$ intersect at point at infinity in the direction of $(b,-a)$ ### Ideal points Given a homegeneous vector $x=(x_1,x_2,x_3)^T \in P^2$ such that $x_3 \neq 0$, there's a mapping from $P^2$ to $R^2$. The points with the the last coordinate $x_3=0$ are known as **ideal points** or **points at infinity**. The set of all ideal points may be written as $(x_1,x_2,0)^T$ ### Line at infinity The set of all ideal points may be written as $(x_1,x_2,0)^T \in P^2$. Note that this set lies on a single line, the **line at infinity** denoted by the vector $l_{\infty} = (0,0,1)^T$. One can verify that $(0,0,1)(x_1,x_2,0)^T=0$ Given a line $l=(a,b,c)^T$ intersects $l_{\infty}$ in the ldeal point $(b,-a,0)^T$. In inhomogeneous notation $(b,-a)^T$ is a vector tangent to the line, and orthogonal to the line normal $(a,b)$, and so represents the line direction. As the line's direction varies, the ideal point $(b,-a,0)^T$ varies over $l_{\infty}$. For these reasons the line at infinity can be thought of as the set of diretions of lines in the place. Note how the introduction of the concept of points at infinity serves to simplify the intersection properties of points and lines. :::info In the projective plance $P^2$, one may state without qualification that - Two distinct lines meet in a single points - Two distrinct points lie on a single line ::: This is not true in the standard Euclidean geometry of $R^2$, in which parallel lines form a special case. ## Model for the projective plance