How can I find the genral equation of a perpendicular line to a given line that passes through a point, using vector algebra?
For example:
given a line $\ell_1: \begin{bmatrix}a_1 \\ a_2 \end{bmatrix} + t \begin{bmatrix}b_1 - a_1 \\ b_2 - a_2\end{bmatrix}$
and a point $\mathbf{P} = \begin{pmatrix}0 \\ 0 \end{pmatrix}$
How can you fine the general equation (form: $\;\;a_1x + b_1y + c = 0 \;\;$) of the line $\ell_2$ that passes through $\mathbf{P}$ and perpendicular to $\ell_1$?
Since the line $\ell_2$ must pass through the origin, it is of the form
$t\left[\begin{matrix}c_1\\ c_2 \end{matrix}\right]$,
for some $c_1,c_2\in\mathbb{R}$.
As $\ell_2 \perp\ell_1$, one ought to have that any vector parallel to second line is orthogonal to any parallel to the first one, that is
$\left[\begin{matrix}t c_1\\ tc_2 \end{matrix}\right]^T\left[\begin{matrix}s(b_1-a_1)\\ s(b_2-a_2) \end{matrix}\right]=0$
for all $s,t\in\mathbb{R}$. Now, you may take $s=1$ and you get your answer.