I don't have a diagram here so you will havce to use your imagination.
A rectangle has two parallel sides top and bottom, i,e, horizontally, and two parallel side vertically.
Let the rectangle be ABCD, with AB and DC the two vertical sides and BC and AD the two horizontal sides.
The opposite sides of ABCD, e.g. AB with DC and BC with AD, can be represented by the same vectors, a and b, i.e a for the two vertical sides and b for the two horizontal sides: this merely indicates that these sides are of equal length and are parallel (i.e., being parallel simply means that they point in the same direction).
Thus, since sides AB and DC are parallel and of equal length, they can be represented by the same vector a, despite the fact that they are in different places on the diagram.
Let AD be represented by the vector b.
Let AC be the vector c.
Let BD be the vector d.
Then, vectorially, AC = AD + DC, or c = b + a.
Also, vectorially, BD = BA + AD, or d = -a + b.
The lengths of the two vectors AC and BD are given by the moduli of their vectors.
|AC| = |c| = sqrt(b^2 + a^2)
|BD| = |d| = sqrt((-a)^2 + b^2)
i.e. |AC| = |BD|, the diagonals of the rectangle are equal.