Compose two  reflections
Author: Laurel Langford

The original flag is B (green), which is reflected over e to get B' (gray), which is in turn reflected over f to get B'' (red).

Some questions to explore:
1. Does the composition give the same result as reflecting across the lines in the opposite order?
2. Is the composition the same as the result y of a single translation?
3. Is the composition the same as  the result y of a  single rotation?
4. Is the composition the same as  the result y of a  single reflection?
5. Is the composition the same as  the result y of a  single glide reflection?
If any of 2-5 seem to be correct, the next questions are: is this always true, and if not, under what circumstances is this true?
Additionally, in any of the cases 2-5, can you relate the single transformation (2-5) to the mirror lines in any specific way?  Can you, for instance, describe the length or direction of a translation vector, or the point or angle for a rotation in terms of the original reflection lines?

Compose two rotations

y

Show reflection in line h (purple)

y

Show rotation through angle α,

around point P (purple)

y

Show translation by vector u (purple)

y

Show glide reflection by vector v (purple)

B'

B''

The original (green) flag B is rotated around F 
through angle β to get to the gray flag B'.
The gray flag is then rotated around G 
through angle γ to get to the red flag B''

Show rotations in opposite order (blue)

A = (-2.7, 1.1)
B = (-2.94, 3.68)
a = Segment(A, B)
C = (-1.86, 3.7600000000000002)
b = Segment(B, C)
D = (-1.78, 2.82)
c = Segment(C, D)
E = Point(a)
d = Segment(D, E)
P = (0.8, 0.3)
Q = (-2.82, -0.24)
h = Line(P, Q)
A'_3 = Mirror(A, h)
B'_5 = Mirror(B, h)
a'_3 = Segment(A'_3, B'_5)
B'_6 = Mirror(B, h)
C'_5 = Mirror(C, h)
b'_3 = Segment(B'_6, C'_5)
C'_6 = Mirror(C, h)
D'_5 = Mirror(D, h)
c'_3 = Segment(C'_6, D'_5)
D'_6 = Mirror(D, h)
E'_3 = Mirror(E, h)
d'_3 = Segment(D'_6, E'_3)
i = false
R = (-1.36, -0.28)
V = (5.82, 0.66)
W = (6.8, 0.66)
p = Circle(V, W)
l = Segment(W, V)
Z = Point(p)
m = Segment(V, Z)
α = Angle(W, V, Z)
A'_4 = Rotate(A, α, R)
B'_7 = Rotate(B, α, R)
a'_4 = Segment(A'_4, B'_7)
B'_8 = Rotate(B, α, R)
C'_7 = Rotate(C, α, R)
b'_4 = Segment(B'_8, C'_7)
C'_8 = Rotate(C, α, R)
D'_7 = Rotate(D, α, R)
c'_4 = Segment(C'_8, D'_7)
D'_8 = Rotate(D, α, R)
E'_4 = Rotate(E, α, R)
d'_4 = Segment(D'_8, E'_4)
j = false
S = (2.7800000000000002, -0.34)
T = (2.58, -3.46)
u = Vector(S, T)
A'_5 = Translate(A, u)
B'_9 = Translate(B, u)
a'_5 = Segment(A'_5, B'_9)
B'_{10} = Translate(B, u)
C'_9 = Translate(C, u)
b'_5 = Segment(B'_{10}, C'_9)
C'_{10} = Translate(C, u)
D'_9 = Translate(D, u)
c'_5 = Segment(C'_{10}, D'_9)
D'_{10} = Translate(D, u)
E'_5 = Translate(E, u)
d'_5 = Segment(D'_{10}, E'_5)
k = false
U = (2.74, 0.98)
A_1 = (2.88, -1.94)
v = Vector(U, A_1)
A'_1 = Translate(A, v)
B'_{11} = Translate(B, v)
a'_1 = Segment(A'_1, B'_{11})
B'_1 = Translate(B, v)
C'_{11} = Translate(C, v)
b'_1 = Segment(B'_1, C'_{11})
C'_1 = Translate(C, v)
D'_{11} = Translate(D, v)
c'_1 = Segment(C'_1, D'_{11})
D'_1 = Translate(D, v)
E'_1 = Translate(E, v)
d'_1 = Segment(D'_1, E'_1)
n = Line(U, A_1)
A''_1 = Mirror(A'_1, n)
B_1 = Mirror(B'_{11}, n)
a''_1 = Segment(A''_1, B_1)
B''_1 = Mirror(B'_1, n)
C_1 = Mirror(C'_{11}, n)
b''_1 = Segment(B''_1, C_1)
C''_1 = Mirror(C'_1, n)
D_1 = Mirror(D'_{11}, n)
c''_1 = Segment(C''_1, D_1)
D''_1 = Mirror(D'_1, n)
E''_1 = Mirror(E'_1, n)
d''_1 = Segment(D''_1, E''_1)
o = false
F = (-2.56, 0.54)
G = (-0.04, 1.04)
H = (10.22, -2.68)
I = (11.34, -2.68)
w = Vector(H, I)
J = (8.32, 0.72)
K = (10.8, 0.72)
J' = Translate(J, w)
K' = Translate(K, w)
e = Segment(J, J')
f = Segment(K, K')
g = Circle(J, J')
q = Circle(K, K')
L = Point(g)
r = Segment(J, L)
M = Point(q)
s = Segment(K, M)
β = Angle(J', J, L)
γ = Angle(K', K, M)
A'_2 = Rotate(A, β, F)
B'_2 = Rotate(B, β, F)
a'_2 = Segment(A'_2, B'_2)
B'_3 = Rotate(B, β, F)
C'_2 = Rotate(C, β, F)
b'_2 = Segment(B'_3, C'_2)
C'_3 = Rotate(C, β, F)
D'_2 = Rotate(D, β, F)
c'_2 = Segment(C'_3, D'_2)
D'_3 = Rotate(D, β, F)
E'_2 = Rotate(E, β, F)
d'_2 = Segment(D'_3, E'_2)
A''_2 = Rotate(A'_2, γ, G)
N = Rotate(B'_2, γ, G)
a''_2 = Segment(A''_2, N)
B''_2 = Rotate(B'_3, γ, G)
O = Rotate(C'_2, γ, G)
b''_2 = Segment(B''_2, O)
C''_2 = Rotate(C'_3, γ, G)
E_1 = Rotate(D'_2, γ, G)
c''_2 = Segment(C''_2, E_1)
D''_2 = Rotate(D'_3, γ, G)
E''_2 = Rotate(E'_2, γ, G)
d''_2 = Segment(D''_2, E''_2)
A' = Rotate(A, γ, G)
B'_4 = Rotate(B, γ, G)
a' = Segment(A', B'_4)
B' = Rotate(B, γ, G)
C'_4 = Rotate(C, γ, G)
b' = Segment(B', C'_4)
C' = Rotate(C, γ, G)
D'_4 = Rotate(D, γ, G)
c' = Segment(C', D'_4)
D' = Rotate(D, γ, G)
E' = Rotate(E, γ, G)
d' = Segment(D', E')
A'' = Rotate(A', β, F)
F_1 = Rotate(B'_4, β, F)
a'' = Segment(A'', F_1)
B'' = Rotate(B', β, F)
G_1 = Rotate(C'_4, β, F)
b'' = Segment(B'', G_1)
C'' = Rotate(C', β, F)
H_1 = Rotate(D'_4, β, F)
c'' = Segment(C'', H_1)
D'' = Rotate(D', β, F)
E'' = Rotate(E', β, F)
d'' = Segment(D'', E'')
t = false