Find the value of the real parameter
\(a\) which ensures, that
the following two lines \(p\)
and \(q\)
are perpendicular.
\[
p\colon ax + y - 4 = 0,\qquad q\colon x + 2y + 4 = 0.
\]
Find the distance from the point \(M = [1,1]\)
to the line \(p\).
\[
\begin{aligned}p\colon x& = 3 + t, &
\\y & = 1 + t,\ t\in \mathbb{R}
\\ \end{aligned}
\]