So you're given the points \vec{p}_1=(x_1, y_1) and \vec{p}_2=(x_2, y_2).
A line is given by the equation
<br />
a x + b y <br />
=\begin{pmatrix} a & b \end{pmatrix} \cdot \begin{pmatrix} x \\ y \end{pmatrix} <br />
= c<br />
Which, assuming c \neq 0, can be rescaled to
<br />
\begin{pmatrix} a & b \end{pmatrix} \cdot \begin{pmatrix} x \\ y \end{pmatrix} = 1<br />
Then the two points must satisfy
\begin{align}<br />
&\begin{pmatrix} a & b \end{pmatrix}\cdot\begin{pmatrix}x_1&x_2 \\ y_1&y_2\end{pmatrix} = \begin{pmatrix} 1 & 1 \end{pmatrix} \\<br />
\implies<br />
&\begin{pmatrix} a & b \end{pmatrix} = \begin{pmatrix} 1 & 1 \end{pmatrix}<br />
\begin{pmatrix}x_1&x_2 \\ y_1&y_2\end{pmatrix}^{-1}<br />
=\frac{1}{x_1 y_2 - x_2 y_1}\begin{pmatrix} y_1-y_2 & x_1-x_2\end{pmatrix}<br />
\end{align}
And so we have the equation for the line. (This is just "[URL rule[/URL])
Note that if \det(\vec{p}_1, \vec{p}_2) = x_1 y_2 - x_2 y_1 = 0 \,, (which happens when \vec{p}_1\propto\vec{p}_2)
then the above does not make sense and the line must go through the origin, i.e. c=0.
In which case,
a x = - b y \quad \implies \quad y = -\frac{a}{b}x
and we can just use either point to find the single parameter determining the line
\frac{a}{b} = -\frac{y_1}{x_1} = -\frac{y_2}{x_2} \ .