The following problem is a nice accessible challenge for engaging and drawing talented mathematics learners into creative problem solving that goes only slightly beyond the average high school geometry curriculum. Personally I first learnt of this problem around 1990, but I've since then seen it, or variations of it, in many geometry books and popular problem solving books (e.g. Quines, 2018; Pillay, 2020). It has more recently been called the British flag theorem (Wikipedia). Though not well-known, the result is quite old with Lardner (1848) one of the first references to it.
British Flag theorem
If P is an arbitrary point lying in the plane of a rectangle ABCD, then the sum of the squares of the distances from P to two opposite (alternate) vertices of the rectangle equals the sum to the other two opposite (alternate) vertices. In other words, PA² + PC² = PB² + PD².
(Note that the theorem can be viewed as a generalization of the theorem of Pythagoras. For example, if we move P to vertex A, then since AD = BC, the theorem effectively reduces to AC² = AB² + BC².)
Explore
The dynamic sketch below illustrates this theorem.
1. Drag P in the dynamic sketch below and observe how the measured distances change.
2. Click on the 'Show Sum Squared Distances' buttons in the figures below, and again drag P. What do you notice?
3. Change the shape of the rectangle by dragging any one of the vertices. Then again drag P.
4. Also ensure that you drag P outside the rectangle (and its circumcircle). What do you notice?
Challenge
5. Can you explain why (prove that) the result is true? Can you prove it in more than one way?
(If stuck, click on the 'Proof Hint' button in the sketch below.)
6. Can you generalize further to hexagons, octagons, etc.?
A Generalization of the British Flag theorem
Further Generalization
7. Click on the 'Link to semi-regular angle-hexagon' button to navigate to a new sketch. Explore the sketch by dragging P and clicking 'Show Sum Squared Distances' button. What do you notice about the sums of squared distances to the alternate vertices?
8. Click on the 'Link to semi-regular angle-octagon' button to navigate to a new sketch. Explore the new sketch by dragging P and clicking 'Show Sum Squared Distances' button. What do you notice about the sums of squared distances to the alternate vertices?
9. Ensure in 7 & 8 above that you also drag P outside the polygon as well as outside its circumcircle. What do you notice?
10. In 7 & 8 above also drag any of the vertices until the polygon becomes crossed. Then drag P. What do you notice?
11. Can you generalize further? Formulate your observations as a conjecture.
Challenge
12. Can you explain why (prove that) your observations in 7-11 are true?
Dual Generalization
13. What happens to the sums of the squared distances to the alternate vertices if instead of a semi-regular angle-2n-gon we consider a semi-regular side-2n-gon?
14. Click on the 'Link to semi-regular side-hexagon' button to navigate to a new sketch. Explore the sketch by dragging P and clicking the 'Show Sum Squared Distances' button. What do you now notice about the sums of squared distances to the alternate vertices?
15. Next click on the 'Show Difference between Alternate Sums' button. Again drag P. What do you now notice?
16. Click on the 'Show Difference between circum radii' button. Again drag P. What do you now notice?
17. Formulate a conjecture from your observations in 15-17. Can you generalize further?
(Note: If P moves only on the green incircle of the semi-regular side-hexagon, then the total sum of all the distances to the vertices remain constant - see for example: Sum of Squared Distances related to Incircles & Circumcircles and click on the 'Link to generalization 3' button to view a dynamic illustration).
Challenge
18. Can you explain why (prove that) your observations in 15-17 are true?
Other Generalizations
The British flag theorem remains valid even if the point P is in space, and generalizes to an isosceles trapezoid as shown by Tran (2021). Also see Nguyen & Dao (2015) for an interesting area generalization related to a constant area sum of two similarly oriented regular 2n-gons.
Related Results
Closely related to the British Flag theorem is the following problem that was given to me at the beginning of 1991 by our Head of Department at the time, Prof. Moon Moodley, University of Durban-Westville (now the University of KwaZulu-Natal), namely: If any point P in the plane of a rectangle ABCD is connected to the four vertices and to its center O, then PA² + PB² + PC² + PD² = AC² + 4PO².
Challenge
Can you prove this related result using the British Flag theorem? (Can you generalize further?)
(Hint: If stuck, compare your proof with my handwritten one from 1991 given in the references below).
The following two dynamic pages are also closely related to the British flag theorem and also deal with 'sums of squared distances' in relation to polygons:
Sum of Squared Distances related to Incircles & Circumcircles
Sum of Squared Distances to Vertices of Polygons
Submitted Papers
The following two related papers by myself and Hans Humenberger, namely, "A Generalization of the British Flag theorem to Semi-regular Angle-2n-gons" and "Constant Sums of Squared Distances to Vertices and Sides of Polygons", regarding the dynamic generalizations illustrated here, have been submitted for publication. All rights reserved.
References
De Villiers, M. (1991). Hand-written proof of British Flag Related Result. Unpublished.
De Villiers, M. (2011). Equi-angled cyclic and equilateral circumscribed polygons. The Mathematical Gazette, 95(532), pp. 102-106.
Lardner, D. (1848). The First Six Books of the Elements of Euclid. H.G. Bohn, p. 87.
Nguyen, M. H. & Dao T. O. (2015). An interesting application of the British flag theorem. Global Journal of Advanced Research on Classical and Modern Geometries, Volume 4 , issue 1, pp. 31–34.
Pillay, P. (2020). Problem S115. 1000 Mathematics Olympiad Problems. South African Mathematics Foundation (SAMF), pp. 56, 419.
Quines, C.J. (2018). Obscure geometry theorems. Published online at: Handouts.
Tran, Q. H. (2021). British flag theorem for isosceles trapezia. The Mathematical Gazette, 105 (564), pp. 523-529, https://doi.org/10.1017/mag.2021.127.
Related Links
Semi-regular Angle-gons and Side-gons (Generalizations of rectangles & rhombi)
Sum of Squared Distances related to Incircles & Circumcircles
Sum of Squared Distances to Vertices of Polygons
Sum of powers of distances to vertices and sides
Airport Problem (Rethinking Proof activity)
Alternate sides cyclic-2n-gons and Alternate angles circum-2n-gons (Generalizations of isosceles trapezia & kites)
Cyclic Quadrilateral Alternate Angle Sum (Rethinking Proof activity, incl. generalization to cyclic 2n-gons)
Duncan Gregory's Cyclic Hexagon Alternate Angles Sum Theorem
A generalization of the Cyclic Quadrilateral Angle Sum theorem
Logical Discovery: Tangential quadrilateral (Rethinking Proof activity, Pitot's theorem incl. generalization to tangential 2n-gons)
Circumscribed Hexagon Alternate Sides Sum Theorem
The Tangential (or Circumscribed) Polygon Alternate Side Sum theorem
A Rectangle Angle Trisection Result (Application of symmetry)
A Rhombus Angle Trisection Result (Application of symmetry)
Distances in an Equilateral Triangle (Viviani's Theorem) (Rethinking Proof activity)
2D Generalizations of Viviani's Theorem to Polygons
Parallelogram Distances (An intro to directed distances)
Carnot's (or Bottema's) Perpendicularity Theorem & Some Generalizations
Thabit's Generalization of the Theorem of Pythagoras
A Generalization of the Theorem of Pythagoras by Hannes du Plooy
Pythagorean & Orthodiagonal Quadrilaterals & Some Properties
The theorem of Hippocrates (470 – c. 410 BC)
A generalization of a Parallelogram Theorem by Apollonius
Intersecting Circles Investigation (with proof of Pythagoras)
Cosine-Sine Angle Rule
Ptolemy's theorem
The Center of Gravity of a Triangle (Rethinking Proof activity)
Cross's (Vecten's) theorem & generalizations to quadrilaterals
Bride's Chair Concurrency & Generalization
External Links
British flag theorem (Wikipedia)
Aimssec Lesson Activities (African Institute for Mathematical Sciences Schools Enrichment Centre)
UCT Mathematics Competition Training Material
SA Mathematics Olympiad Questions and worked solutions for past South African Mathematics Olympiad papers can be found at this link.
(Note, however, that prospective users will need to register and log in to be able to view past papers and solutions.)
********************************
Back to "Dynamic Geometry Sketches"
Back to "Student Explorations"
Michael de Villiers, created with WebSketchpad, 3 June 2026; updated 6 June 2026; 22 June 2026, 29 June 2026; 8 July 2026; 19 August 2026.