## Surjection between all straight lines to Projective space.

Hello, I was wondering if someone could tell me if what I am doing for this question makes sense (and maybe point me in the right direction if it doesn't).

The question asks to define a natural surjection between the set of all straight lines $X$ and the real projective space $P^1$, and write it using local coordinates on $X$ and natural coordinates on $P^1$.

My thinking was first to show both have a natural manifold structure (to get the local coordinates):
$X$ , $U_{0}$ (the set of non-vertical lines) and $U_{1}$ (the set of non-horizontal lines). Each with functions $\rho_{0}(mx+c)=(m,c)$, $\rho_{1}(ny+d)=(n,d)$. This gives an atlas on $X$.
$P^1$ , $V_{0}=([x:y],x\neq0)$ and $V_{1}=([x:y],y\neq0)$. Each with functions $\mu_{0}([x:y])=v=\frac{y}{x}$, $\mu_{1}([x:y])=v'=\frac{x}{y}$. This gives an atlas on $P^1$.

Now associate each straight line in $X$ to each straight line through the origin ( $P^1$), so if the line in $X$ is through the origin, the required function is just the identity, and associate the gradient of all lines in the plane with unique line of same gradient that passes through the origin.

ie. $\iota:X\rightarrow{P^1}$ given by:
$\iota(mx+c)=[x:mx]=[1:m], x\neq0$
$\iota(ny+d)=[ny:y]=[n:1], y\neq0$

Does this make sense, and if so, how could I show that $\iota$ is a smooth map?

Any input would be greatly appreciated.