Chinese Derivation of Pythagorean Triples?

A proof problem by Steven Zheng.

## **Problem**

In the Chinese mathematical text *Jiuzhang Suanshu*, we find an interesting problem that requires the Pythagorean triples formula to solve.

**Chapter 9: Gougu Problem 14**

今有二人同所立。甲行率七，乙行率三。乙東行。甲南行十步而邪東北與乙會。問：甲乙行各幾何？

[There are two persons standing at the same location. Person A moves at a speed of 7. Person B moves at a speed of 3. Person B moves east. Person A first moves 10 bu south, then diagonally northeast until he meets person B once more. How far did each man travel?]

* bu (步) literally means pace, a Chinese unit of length that measures roughly 1.6 meters long.

The units of the speed are not specified, but it is reasonable to assume that the speed is measured in bu per second, which measures 1.6 meters per second.

For calculating the sides a right triangle with integer sides, the solution prescribed by this 2000-year old text uses the formula

(

a
,
b
,
c

)

=

(

1
2

(

m
2

−

n
2

)
,
m
n
,

1
2

(

m
2

n
2

)

)

{\displaystyle \left(a,b,c \right) = \left(\frac{1}{2}(m^2 - n^2), mn, \frac{1}{2}(m^2 + n^2) \right) }

,
where

# m
7

{\displaystyle m = 7 }

 and

# n
3

{\displaystyle n = 3}

 are the speeds of person A and person B respectively. This formula is indeed the formula for generating Pythagorean triples such that all sides of the right triangle are mutually coprime. There is no derivation provided in the *Jiuzhang Suanshu*, so I shall provide one using basic geometry and a little physics (which the ancient Chinese had to some degree).

## **Solution**

Person A and person B begin and meet at the same point at the same time. Person A is the man who runs at a speed of

# m
7

{\displaystyle m = 7 }

 bu per second (which would be 11.2 m/s), who travels along the shorter side and the hypotenuse

a
c

{\displaystyle a + c}

. Person B is the man who runs at a speed of

# n
3

{\displaystyle n = 3}

 bu per second (which would be 4.8 m/s), who travels along the longer side

b

{\displaystyle b}

. Thus we have two constraints: a time constraint, and a geometric constraint.

**Time constraint**

a
c

m

=

b
n

{\displaystyle \frac{a + c}{m} = \frac{b}{n} }

**Geometric constraint**

a
2

b
2

=

c
2

{\displaystyle a^2+b^2=c^2}

From the time constraint, isolate for length

a

{\displaystyle a}

 and square both sides.

# a

m
n

b
−
c

{\displaystyle a = \frac{m}{n} b - c }

a
2

=

m
2

n
2

b
2

−

2
m

n

b
c

c
2

{\displaystyle a^2 = \frac{m^2}{n^2} b^2 - \frac{2m}{n} bc + c^2 }

.
Since

a
2

=

c
2

−

b
2

{\displaystyle a^2 = c^2 - b^2 }

 from the geometric constraint,

m
2

n
2

b
2

−

2
m

n

b
c

c
2

=

c
2

−

b
2

{\displaystyle \frac{m^2}{n^2} b^2 - \frac{2m}{n} bc + c^2 = c^2 - b^2 }

.
With some algebra

b
2

(

m
2

n
2

1

)

=

2
m

n

b
c

{\displaystyle b^2 \left(\frac{m^2}{n^2} + 1 \right) = \frac{2m}{n} bc }

b

(

m
2

n
2

n
2

)

=

2
m

n

c

{\displaystyle b \left(\frac{m^2 + n^2}{n^2} \right) = \frac{2m}{n} c }

c
b

=

n

2
m

⋅

m
2

n
2

n
2

{\displaystyle \frac{c}{b} = \frac{n}{2m} \cdot \frac{m^2 + n^2}{n^2} }

c
b

=

m
2

n
2

2
m
n

{\displaystyle \frac{c}{b} = \frac{m^2 + n^2}{2mn} }

.
From the time constraint, one can discover that

a
b

c
b

=

m
n

{\displaystyle \frac{a}{b} + \frac{c}{b} = \frac{m}{n} }

a
b

=

m
n

−

c
b

{\displaystyle \frac{a}{b} = \frac{m}{n} - \frac{c}{b} }

.
Thus

a
b

=

m
n

−

c
b

{\displaystyle \frac{a}{b} = \frac{m}{n} - \frac{c}{b} }

a
b

=

m
n

−

(

2
m
n

m
2

n
2

)

{\displaystyle \frac{a}{b} = \frac{m}{n} - \left(\frac{2mn}{m^2 + n^2}\right) }

a
b

=

m
2

−

n
2

2
m
n

{\displaystyle \frac{a}{b} = \frac{m^2 - n^2}{2mn} }

.
Since

a
,
b
,
c

{\displaystyle a,b,c}

 are mutually coprime, the above two boxed results suggests

(

a
,
b
,
c

)

=

(

m
2

−

n
2

,
2
m
n
,

m
2

n
2

)

{\displaystyle \left(a,b,c \right) = \left(m^2 - n^2, 2mn, m^2 + n^2 \right) }

or

(

a
,
b
,
c

)

=

(

1
2

(

m
2

−

n
2

)
,
m
n
,

1
2

(

m
2

n
2

)

)

{\displaystyle \left(a,b,c \right) = \left(\frac{1}{2}(m^2 - n^2), mn, \frac{1}{2}(m^2 + n^2) \right) }

.