Activity 5

Prepared by Mike Kramer

Given the quadrilateral with vertices A(-5, 2), B(11.3, 7.1), C(16.4, 5.0), and D(0.1, -0.1).
(a) Show that ABCD is a parallelogram.
(b) Are the diagonals perpendicular? Show how you know.
(c) Show that the diagonals bisect each other.

(a) Define a formula to measure the square of the length of the segment connecting any two points:

length[{x1_, y1_}, {x2_, 
          y2_}] := (x1 - x2)^2 + (y1 - y2)^2

a = {-5, 2}; b = {11.3, 7.1}; c = {16.4, 5.0}; 
    d = {0.1, -0.1};

Calculate the square of the length of side AB:

length[a, b]

and compare it to that of CD:

length[c, d]

and note that these lengths are equal. We can show the equality of BC and AD in a more sophisticated way:

BC = length[b, c]

AD = length[a, d]

TrueQ[BC == AD]

(b)  Define a formula for the slope of the segment connecting any two points:

slope[{x1_, y1_}, {x2_, y2_}] := (y1 - y2)/(x1 - x2)

We can determine the slopes of the diagonals AC and BD and test their product to see if it is equal to -1:

slope[a, c] slope[b, d]

The product is not equal to -1 so the diagonals are not perpendicular.

(c) Define a formula for the coordinates of the midpoint of the segment connecting any two points:

mdpt[{x1_, y1_}, {x2_, y2_}] := {(x1 + x2)/2, (y1 + y2)/
          2}

We can compare the coordinates of the midpoints of the two diagonals to see if they're the same.

Midpoint of AC:

AC = mdpt[a, c]

Midpoint of BD:

BD = mdpt[b, d]

Since the midpoints are the same, the diagonals bisect each other.

Comments

You might wonder why the capital letters A, B, C, and D were not used in the calculations above.  A and B would be fine but C and D have special meaning in Mathematica and can't be used as variables.  Other single letters that are "reserved" are E, I, N,  and O.

Here is a graphic of the parallelagram that we've examined above.

figure = {Line[{a, b, c, d, a}]};
Show[Graphics[figure], AspectRatio -> Automatic]