I have the following piece of code and I would like to add two things:
Add a label to the red dot i.e., the intersection of the line segments. Unfortunately, just a ${...}$ does not seem to work.
I want to draw an arrow from the vector a to the line segment showing that the vector is orthogonal to it.
Thank you
\documentclass{article}
\usepackage{tikz}
\newcommand{\tikzAngleOfLine}{\tikz@AngleOfLine}
\def\tikz@AngleOfLine(#1)(#2)#3{%
\pgfmathanglebetweenpoints{%
\pgfpointanchor{#1}{center}}{%
\pgfpointanchor{#2}{center}}
\pgfmathsetmacro{#3}{\pgfmathresult}%
}
\begin{document}
\begin{tikzpicture}[scale=1.5]
\draw (-1,3) coordinate (a_1) -- (3,0) coordinate (a_2);
\draw (-1,2.7) coordinate (b_1) -- (3.5,1) coordinate (b_2);
\coordinate (a) at (intersection of a_1--a_2 and b_1--b_2);
\fill[red] (a) circle (1pt);
\tikzAngleOfLine(a_1)(a_2){\angle};
\draw[black,->] (a_2) -- ++ (\angle+90:0.3) node[midway,above=0.1cm] {$a$};
\end{tikzpicture}
\end{document}


\node[label=below:$r$] at (a) {};. For 2), how should that desired arrow be? (an arrow in the shape of an arc or something else?). – Gonzalo Medina Nov 19 '14 at 18:03