Find point on line a vector intersects I am dealing with $2D$ euclidean space. I have a line described by two points in space $L_1$ and $L_2$, a position in space $P$, and a unit vector $v$.
If I make a line starting at $P$ and infinitely goes in the direction of $v$, how would I determine if that line would intersect the line made by connecting $L_1$ and $L_2$, as well as where the intersection occurred?
 A: Suppose $p=(p_1,p_2)$, $v=(v_1, v_2)$, $l_1=(l_{11},l_{12})$. Then the line connecting $l_1, l_2$ can be represented as
$$\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}l_{11}\\l_{12}\end{pmatrix}+s\begin{pmatrix}l_{21}-l_{11}\\l_{22}-l_{12}\end{pmatrix}.$$
The line starts from $p$ and goes in the direction of $v$ can be represented as
$$\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}p_1\\p_2\end{pmatrix}+t\begin{pmatrix}v_1\\v_2\end{pmatrix}.$$
Now setting them equal to each other, you get two equations and two unknowns $s,t$. If there exists a solution, then it is the unique intersection. If there is no solution, then there is no intersection. Notice that though whenever $v$ and $l_2-l_1$ are not multiples of each other, they are not parallel. So they should have an intersection. 
A: Let's use the following notations: 
$\ell_1=(x_1,y_1)$, $\ell_2=(x_2,y_2)$, $v=(x_v,y_v)$, $p=(x_p,y_p)$.
The parametric equation for the line given by $p$ and $v$ is:
$$(x,y)=(x_p+tx_v,y_p+ty_v).$$
From here $x=x_p+tx_v\rightarrow t=\frac{x-x_p}{x_v}$ and then
$$y=\frac{y_v}{x_v}x+\frac{y_px_v-x_py_v}{x_v}.\color{white}{\text{.....}}(*)$$
The equation for the line given by $\ell_1$ and $\ell_2 $ is
$$y=\frac{y_1-y_2}{x_1-x_2}x+\frac{y_1x_2-y_2x_1}{x_1-x_2}.\color{white}{\text{...}}(**)$$
There are three possibilities:
If 
$$\frac{y_v}{x_v}=\frac{y_1-y_2}{x_1-x_2} \text{ and }\frac{y_px_v-x_py_v}{x_v}=\frac{y_1x_2-y_2x_1}{x_1-x_2}$$
the the two lines are the same.
If 
$$\frac{y_v}{x_v}=\frac{y_1-y_2}{x_1-x_2} \text{ but }\frac{y_px_v-x_py_v}{x_v}\not =\frac{y_1x_2-y_2x_1}{x_1-x_2}$$
then the two lines are parallel and will never meet.
If
$$\frac{y_v}{x_v}\not=\frac{y_1-y_2}{x_1-x_2}$$
then the the two lines are not parallel and will meet. 
Even if our lines meet in general, it is not certain that they will meet for $t\geq 0$ (or for $t\leq 0$) depending on the direction of $v$. If I am not mistaken the OP asks if the lines meet if we consider the first line only from the point $p$, i.e. if we consider only a half line and another straight.
The following figure depicts what kind analysis will show if the half line and the lines really meet:

etc. (Note again that everything depends on the direction of $v$.)
However, if we solve the system of equations (*) and (**) for $x$ and $y$ then finally we will have to check the sign of the corresponding $t$ (The meaning of the sign depends on the direction of $v$.). If it is negative (positive) then the half line and the line will not meet...
A: The usual approach to this type of problem involves setting up a system of equations for the two lines and then trying to solve the system, as described in other answers. This method is generally applicable—it works in Euclidean spaces of any dimension. In the specific case of $\mathbb R^2$, however, there’s a way to crank out a solution to this type of problem entirely mechanically using homogeneous coordinates and cross products. 
In homogeneous coordinates, a point $(x,y)$ in $\mathbb R^2$ is represented by the equivalence class of ordered triples $\{(wx,wy,w)\mid w\ne0\}$. Generally, you set $w=1$ initially, but operations on the points may result in some other value for the third component. To recover the Euclidean coordinates of a point, simply divide by $w$. Effectively, you’re working in the projective plane $\mathbb P^2$ instead of the Euclidean plane. Coordinate triples with a zero for their third component represent the points at infinity of the projective plane, which we’ll make use of below.  
It turns out that lines can also be represented in homogeneous coordinates as (equivalence classes of) ordered triples. In fact, the line through a pair of points can be represented by the cross product of the homogeneous coordinates of those points. If we have a point and a direction instead, we can still take a cross product to get the representation of the line by using the point at infinity in the given direction, i.e., if the direction vector is $(v_x,v_y)$, we take the cross product with $(v_x,v_y,0)$. Note that $v$ need not be a unit vector. Any vector that points in the right direction will do. By the point/line duality of the projective plane, we might expect that the intersection of two lines is also given by their cross product, and that’s indeed the case. If the third component of this cross product is zero, then the lines intersect at infinity—they’re parallel or coincident in $\mathbb R^2$. In the latter case, the cross product will be zero. 
Now, it looks like you might be trying to find out if a ray that originates at a point $p$ intersects a given line. Determining that involves a simple additional check. Once you’ve found the point of intersection $q$ (if any) of the two lines, compute the vector $q-p$ and compare it with $v$: a ray in the direction of $v$ will also intersect the line iff $q-p$ is a positive multiple of $v$.  
For example, let $l_1=(3,2)$, $l_2=(5,-1)$, $p=(1,0)$ and $v=(1/\sqrt5,-2/\sqrt5)$. Our two lines are then $(3,2,1)\times(5,-1,1)=(3,2,-13)$ and $(1,0,1)\times(-1/\sqrt5,2/\sqrt5,0)=(2/\sqrt5,1/\sqrt5,-2/\sqrt5)$. Taking a cross product again results in $(9/\sqrt5,-4\sqrt5,-1/\sqrt5)$ and multiplying through by $1/w=-\sqrt5$ produces $q=(-9,20)$ for the intersection point. Now, $q-p=(-10,20)$, which has opposite signs from $v$, so even though the lines intersect, the ray from $p$ in the direction of $v$ does not intersect $\overline{l_1l_2}$. Incidentally, we could’ve avoided the radicals in the preceding by using $v=(-1,2)$ instead. Try it yourself to see that you get the same answer.  
To illustrate the case of parallel lines, take the same points, but now set $v=l_2-l_1=(2,-3)$. The second line is then $(1,0,1)\times(2,-3,0)=(3,2,-3)$ and the cross product of this with the first line is $(-20,30,0)$, which has a zero for its third component, as expected.
