\begin{tikzpicture}[scale=1.2, vect/.style={->,shorten >=3pt,>=latex'}] \tkzDefPoint(2,1){A} \tkzDefPoint(6,2){B} \tkzDefPointWith[orthogonal,K=.5](A,B) \tkzGetPoint{C} \tkzDefPointWith[colinear=at C,K=.5](A,B) \tkzGetPoint{D} \tkzMarkRightAngle[fill=gray!20](B,A,C) \tkzDrawSegments[vect](A,B A,C C,D) \tkzDrawPoints(A,...,D) \end{tikzpicture}