If we start with a triangle ABC and erect squares on two of its sides, then join the two outer vertices of the squares it creates a new triangle, called a flank triangle.

Theorem: If we draw a line passing through the midpoint of the outer edge of the flank triangle and the apex of the original triangle, it will be perpendicular to the base of that triangle. In the diagraml ine HCI is at right angles to AB.
Proof: Rotate the flank triangle through 90° about point C.

Consider the triangle ABD'.
From the construction:
ACD' must be a straight line, and AC = CG, so C is the midpoint of AD'.
BD' is the image of GD and H' the image of midpoint H, so H' is the midpoint of BD'.
Hence CH' joins the midpoints of two sides of ABD' and is therefore parallel to the base AB. CH' is perpendicular to CH and hence to HI.
But this means HI must be perpendicular to AB, because CH' and AB are parallel. //
Exercise: Prove the flank triangle and the original triangle have equal areas.
I got this problem from Cut-the-Knot 'Properties of flank triangles' and drew the graphics in GeoGebra.