Adding and Multiplying Fractions
Author: Megan Yanes

Use the sliders below to perform addition and multipllication of fractions.

The red sliders represent the numerator and denominator of the first fraction.  The blue sliders represent the numerator and denominator of the second fraction.  Move the sliders to the desired positions for the fractions you are adding or multiplying.  Next, move the blue point to the left so that the two squares coincide.  

For addition,

The numerator can be found by counting all of the shaded rectangles.  The purple ones must be counted twice since they are two overlapping rectangles (one red and one blue).  The denominator is found by counting all of the small congruent rectangles.

For multiplication, the answer is:

(all of the purple rectangles) / (total number of small congruent rectangles)

x

=

=

Fraction 1

Fraction 2

Num1 = 5 (slider from 0 to 10, step 1)
Den1 = 8 (slider from 1 to 10, step 1)
Num2 = 3 (slider from 0 to 10, step 1)
Den2 = 5 (slider from 1 to 10, step 1)
A = (-1.5438072070160338, -1.4964981300963522)
e = OrthogonalLine(A, yAxis)
f = OrthogonalLine(A, e)
Taille = 12 (slider from 6 to 12, step 0.1)
h = Circle(A, Taille)
B = Intersect(h, e, 1)
C = Intersect(h, f, 2)
D = Intersect(h, e, 1)
i = OrthogonalLine(B, e)
E = Intersect(h, f, 2)
j = OrthogonalLine(C, f)
F = Intersect(i, j)
P, a_1, b_1, f_1, c_1 = Polygon(A, B, F, C)
VarRayon: Taille / Den1
k = Circle(A, VarRayon)
G = Intersect(k, a_1)
p = Circle(G, A)
H = Intersect(p, a_1, 2)
q = Circle(H, G)
I, J = Intersect(q, a_1)
r = Circle(J, H)
K, L = Intersect(r, a_1)
s = Circle(L, J)
M, N = Intersect(s, a_1)
t = Circle(N, L)
O, Q = Intersect(t, a_1)
d_1 = Circle(Q, N)
R, S = Intersect(d_1, a_1)
e_1 = Circle(S, Q)
T, U = Intersect(e_1, a_1)
g_1 = Circle(U, S)
V, W = Intersect(g_1, a_1)
h_1 = Circle(W, U)
l = OrthogonalLine(G, a_1)
m = OrthogonalLine(H, a_1)
n = OrthogonalLine(J, a_1)
i_1 = OrthogonalLine(L, a_1)
j_1 = OrthogonalLine(N, a_1)
k_1 = OrthogonalLine(Q, a_1)
l_1 = OrthogonalLine(S, a_1)
m_1 = OrthogonalLine(U, a_1)
n_1 = OrthogonalLine(W, a_1)
Y = Intersect(f_1, l)
Z = Intersect(f_1, m)
A_1 = Intersect(f_1, n)
B_1 = Intersect(f_1, i_1)
C_1 = Intersect(f_1, j_1)
D_1 = Intersect(f_1, k_1)
E_1 = Intersect(l_1, f_1)
F_1 = Intersect(f_1, m_1)
G_1 = Intersect(f_1, n_1)
p_1 = Ray(A, B)
H_1 = Point(p_1)
u = Vector(A, H_1)
A' = Translate(A, u)
B' = Translate(B, u)
F' = Translate(F, u)
C' = Translate(C, u)
P', a', b', f', c' = Polygon(A', B', F', C')
q_1 = OrthogonalLine(V, a_1)
r_1 = Circle(V, U)
s_1 = Segment(G, Y)
t_1 = Segment(H, Z)
a_2 = Segment(J, A_1)
b_2 = Segment(L, B_1)
c_2 = Segment(N, C_1)
d_2 = Segment(Q, D_1)
e_2 = Segment(S, E_1)
f_2 = Segment(U, F_1)
g_2 = Segment(W, G_1)
VarRayon_2: Taille / Den2
h_2 = Circle(H_1, VarRayon_2)
J_1 = Intersect(h_2, c', 1)
k_2 = Circle(J_1, H_1)
K_1 = Intersect(k_2, c', 2)
p_2 = Circle(K_1, J_1)
L_1 = Intersect(p_2, c', 2)
q_2 = Circle(L_1, K_1)
M_1 = Intersect(q_2, c', 2)
r_2 = Circle(M_1, L_1)
N_1 = Intersect(r_2, c', 2)
s_2 = Circle(N_1, M_1)
O_1, P_1 = Intersect(s_2, c')
t_2 = Circle(P_1, N_1)
Q_1 = Intersect(t_2, c', 2)
c_3 = Circle(Q_1, P_1)
R_1 = Intersect(c_3, c', 2)
d_3 = Circle(R_1, Q_1)
S_1 = Intersect(d_3, c', 2)
e_3 = Circle(S_1, R_1)
i_2 = OrthogonalLine(J_1, c')
j_2 = OrthogonalLine(K_1, c')
l_2 = OrthogonalLine(L_1, c')
m_2 = OrthogonalLine(M_1, c')
n_2 = OrthogonalLine(N_1, c')
a_3 = OrthogonalLine(P_1, c')
b_3 = OrthogonalLine(Q_1, c')
f_3 = OrthogonalLine(R_1, c')
g_3 = OrthogonalLine(S_1, c')
T_1 = Intersect(b', i_2)
U_1 = Intersect(b', j_2)
V_1 = Intersect(b', l_2)
W_1 = Intersect(b', m_2)
Y_1 = Intersect(b', n_2)
Z_1 = Intersect(b', a_3)
A_2 = Intersect(b', b_3)
B_2 = Intersect(b', f_3)
C_2 = Intersect(b', g_3)
h_3 = Segment(J_1, T_1)
i_3 = Segment(U_1, K_1)
j_3 = Segment(L_1, V_1)
k_3 = Segment(W_1, M_1)
l_3 = Segment(N_1, Y_1)
m_3 = Segment(Z_1, P_1)
n_3 = Segment(Q_1, A_2)
p_3 = Segment(B_2, R_1)
q_3 = Segment(S_1, C_2)
largeur_1: Num1 VarRayon
r_3 = Circle(A, largeur_1)
D_2, S_2 = Intersect(r_3, a_1)
s_3 = OrthogonalLine(D_2, f_1)
E_2 = Intersect(s_3, f_1)
t_3 = OrthogonalLine(E_2, s_3)
F_2 = Intersect(t_3, c_1)
P_2, a_4, d_4, e_4, f_4 = Polygon(A, D_2, E_2, F_2)
b_4 = OrthogonalLine(O, a_1)
G_2 = Intersect(b_4, f_1)
g_4 = Circle(O, N)
Largeur_2: Num2 VarRayon_2
q_4 = Circle(O_1, N_1)
t_4 = OrthogonalLine(O_1, c')
h_5 = Circle(H_1, Largeur_2)
F_3, B1 = Intersect(h_5, c')
i_5 = OrthogonalLine(F_3, c')
G_3 = Intersect(i_5, b')
P_3, h_6, f_6, g_6, b'_1 = Polygon(H_1, F_3, G_3, B')
a = Line(A, H_1)
A1 = Point(a)
b = Line(A1, yAxis)
A'' = Mirror(A', b)
B'' = Mirror(B', b)
F'' = Mirror(F', b)
C'' = Mirror(C', b)
P'', a'', b'', f'', c'' = Polygon(A'', B'', F'', C'')
H_1' = Mirror(H_1, b)
F_3' = Mirror(F_3, b)
G_3' = Mirror(G_3, b)
B''_1 = Mirror(B', b)
P_3', h_1', f_3', g_3', b''_1 = Polygon(H_1', F_3', G_3', B''_1)
J_1' = Mirror(J_1, b)
T_1' = Mirror(T_1, b)
c = Segment(J_1', T_1')
U_1' = Mirror(U_1, b)
K_1' = Mirror(K_1, b)
d = Segment(U_1', K_1')
L_1' = Mirror(L_1, b)
V_1' = Mirror(V_1, b)
g = Segment(L_1', V_1')
W_1' = Mirror(W_1, b)
M_1' = Mirror(M_1, b)
a1 = Segment(W_1', M_1')
N_1' = Mirror(N_1, b)
Y_1' = Mirror(Y_1, b)
b1 = Segment(N_1', Y_1')
Z_1' = Mirror(Z_1, b)
P_1' = Mirror(P_1, b)
c1 = Segment(Z_1', P_1')
Q_1' = Mirror(Q_1, b)
A_2' = Mirror(A_2, b)
d1 = Segment(Q_1', A_2')
B_2' = Mirror(B_2, b)
R_1' = Mirror(R_1, b)
e1 = Segment(B_2', R_1')
S_1' = Mirror(S_1, b)
C_2' = Mirror(C_2, b)
f1 = Segment(S_1', C_2')
v = Vector(A, B'')
A'_1 = Translate(A, v)
D_2' = Translate(D_2, v)
E_2' = Translate(E_2, v)
F_2' = Translate(F_2, v)
P_2', a'_1, d_2', e_2', f_2' = Polygon(A'_1, D_2', E_2', F_2')
G' = Translate(G, v)
Y' = Translate(Y, v)
g1 = Segment(G', Y')
H' = Translate(H, v)
Z' = Translate(Z, v)
h1 = Segment(H', Z')
J' = Translate(J, v)
A_1' = Translate(A_1, v)
i1 = Segment(J', A_1')
L' = Translate(L, v)
B_1' = Translate(B_1, v)
j1 = Segment(L', B_1')
N' = Translate(N, v)
C_1' = Translate(C_1, v)
k1 = Segment(N', C_1')
Q' = Translate(Q, v)
D_1' = Translate(D_1, v)
l1 = Segment(Q', D_1')
S' = Translate(S, v)
E_1' = Translate(E_1, v)
m1 = Segment(S', E_1')
U' = Translate(U, v)
F_1' = Translate(F_1, v)
n1 = Segment(U', F_1')
W' = Translate(W, v)
G_1' = Translate(G_1, v)
p1 = Segment(W', G_1')
C1 = Midpoint(f_1)
E1 = Midpoint(g_6)
T1: "" + Num2
T2: "" + Den2
D1 = Midpoint(c')
T3: "" + Den1
F1 = Midpoint(f'')
T4: "" + Den1
T5: "" + Den1
G1 = Midpoint(c'')
T6: "" + Den2
T7: "" + Den2
T8: "" + Num1
T9: "" + Num1
T10: "" + Num1
H1 = Midpoint(a_4)
I1 = Midpoint(a'_1)
T11: "" + Num2
T12: "" + Num2
J1 = Midpoint(g_3')
T13: "" + (Den1 Den2)
q1 = Circle(D1, 1.5)
r1 = Circle(C1, 2)
s1 = Circle(F1, 2)
t1 = Circle(G1, 1.5)
a2 = Line(C1, b)
K1, L1 = Intersect(r1, a2)
b2 = Line(L1, f_1)
M1, N1 = Intersect(s1, b2)
c2 = Line(F_2', b)
d2 = Line(C'', b)
e2 = Line(F, b)
f2 = Line(C, b)
O1 = Intersect(e2, b2)
P1 = Intersect(e2, f2)
Q1 = Intersect(b2, f2)
w = Vector(L1, O1)
z = Vector(L1, Q1)
g2 = Line(D_2, b)
h2 = Circle(H1, 1.5)
i2 = Line(H1, b)
R1, S1 = Intersect(h2, i2)
j2 = Line(R1, v)
U1 = Intersect(g2, j2)
V1 = Intersect(f2, j2)
k2 = Circle(I1, 1.5)
W1, Z1 = Intersect(k2, j2)
l2 = Line(D_2', b)
A2 = Intersect(l2, j2)
B2 = Intersect(c2, j2)
C2 = Intersect(b2, c2)
D2 = Intersect(b2, d2)
u1 = Vector(R1, U1)
v1 = Vector(R1, V1)
w1 = Vector(W1, A2)
z1 = Vector(W1, B2)
u2 = Vector(M1, C2)
v2 = Vector(M1, D2)
m2 = Line(F, C')
n2 = Line(D1, j2)
E2, F2 = Intersect(q1, n2)
p2 = Line(E2, b)
G2 = Intersect(p2, m2)
q2 = Line(H_1, B)
H2 = Intersect(q2, p2)
w2 = Vector(E2, H2)
z2 = Vector(E2, G2)
r2 = Line(G_3, j2)
s2 = Circle(E1, 1.5)
t2 = Circle(J1, 1.5)
I2, J2 = Intersect(t1, n2)
a3 = Line(J2, b)
K2 = Intersect(q2, a3)
L2 = Intersect(m2, a3)
u3 = Vector(J2, K2)
v3 = Vector(J2, L2)
T14: "" + (Num1 Num2)
b3 = Line(J1, j2)
M2, N2 = Intersect(t2, b3)
c3 = Line(M2, b)
O2 = Intersect(c3, q2)
P2 = Intersect(r2, c3)
w3 = Vector(M2, O2)
z3 = Vector(M2, P2)
Q2, R2 = Intersect(s2, b3)
d3 = Line(R2, b)
S2 = Intersect(d3, q2)
U2 = Intersect(r2, d3)
e3 = Vector(R2, S2)
f3 = Vector(R2, U2)
V2 = (0, 5)
g3 = Line(V2, xAxis)
Z2 = Point(g3)
A3 = Point(g3)
B3 = Point(g3)
C3 = Point(g3)
D3 = Point(g3)
E3 = Point(g3)
h3 = Segment(Z2, A3)
i3 = Segment(B3, C3)
W2 = (11.900098740734713, 2.5260879015141073)
F3 = (30, 0)
k3 = Line(W2, h_6)
l3 = Line(F3, k3)
T18: "" + Num1 + " x " + Num2
T19: "" + Den1 + " x " + Den2
G3 = Point(g3)
H3 = Point(g3)
I3 = Point(g3)
J3 = Point(g3)
j3 = Segment(G3, H3)
m3 = Segment(I3, J3)
M3 = Intersect(c2, e)
L3 = Intersect(e, l2)
n3 = Line(P2, j2)
K3 = Intersect(c2, n3)
N3 = Midpoint(K3, L3)
p3 = Circle(N3, L3)
O3, P3 = Intersect(p3, l2)
poly1, m3_1, l3_1, p3_1, k3_1 = Polygon(M3, L3, P3, K3)