\pgfmathparse{5}\let\dx\pgfmathresult;
\pgfmathparse{2}\let\dy\pgfmathresult;

\coordinate (A) at (-1,-1);
\coordinate (B) at ($(A)+(\dx,\dy)$);

\coordinate (C) at ($(A)+(\dx,0)$);
\coordinate (D) at ($(A)+(0,\dy)$);


\draw [thick] ($(A)!-0.2!(B)$) -- ($(B)!-0.2!(A)$);

\fill (A) circle(1pt) node [below] {$A$};
\fill (B) circle(1pt) node [above] {$B$};

\fill (C) circle(1pt) node [below] {$C$};
\fill (D) circle(1pt) node [above] {$D$};


\draw [dashed] (A) -- (C) -- (B) -- (D) -- (A);


\coordinate (dy) at (0,0.75);

\coordinate (AA) at ($(A)-(dy)$);
\coordinate (CC) at ($(C)-(dy)$);
\draw[-Latex] (AA) -- (CC);
\draw[-Latex] (CC) -- (AA);
\tkzLabelSegment[below](AA,CC) {$|x_b-x_a|$};


\coordinate (dx) at (0.75,0);

\coordinate (AA) at ($(A)-(dx)$);
\coordinate (DD) at ($(D)-(dx)$);
\draw[-Latex] (AA) -- (DD);
\draw[-Latex] (DD) -- (AA);
\tkzLabelSegment[left](AA,DD) {$|y_b-y_a|$};
