TCM Algebra 1: Linear Equations - Part 1

**By: Tao Steven Zheng (郑涛)**

## **Origins of Chinese Linear Algebra**

Linear equations have been studied by many cultures in antiquity. It was first studied in Mesopotamia and Egypt as early as the 2nd millennia BC. Before the 18th century AD, this area of mathematics had reached a higher level of development in China compared to other civilizations. Certainly by the Han dynasty (206 BC - 220 AD), Chinese mathematics had developed a sophisticated understanding of linear equations and had devised systematic methods for solving linear equations. One important factor that stimulated the study of linear equations was its wide range of applications. The mathematicians of ancient China, being predominantly utilitarian in attitude, exploited the power of linear equations when solving problems in commerce, agriculture, and astronomy.

### **Problem Study 1: Length of the Rectangle**

The simplest linear equation is of the form

a
# x
b

{\displaystyle ax=b}

, where

x

{\displaystyle x}

 is the unknown quantity and

a
,
b

{\displaystyle a, b}

are constants. Problems of this type appear in Chapter 4 of the *Jiuzhang Suanshu*, titled *Shao guang* (少廣, "diminishing breadth"). The first eleven problems of this chapter asks for the unknown length of a rectangle given its area and width. Each successive problem increases the width by an additional unit fraction; consequently decreasing the length.

答曰：一百六十步。
術曰：下有半，是二分之一。以一為二，半為一，并之得三，為法。置田二百四十步，亦以一為二乘之，為實。實如法得從步。
Answer: 160 *bu*.

Method: At the bottom there is half, which is 1/2. Take 1 as 2, and 1/2 as 1. Combine them yields 3, and let this be the divisor. Set the field of 240 [square] *bu*, and again, multiply using 1 as 2. Let this be the dividend. Divide the dividend by the divisor to obtain the length in *bu*.

**Solution for *Jiuzhang Suanshu* [4.01]**

Let

A

{\displaystyle A}

 denote the area of the rectangular field and

x

{\displaystyle x}

 be the unknown length. The area of the rectangular field is 1 *mu*, which is equivalent to 240 *bu* (technically square *bu*, however there is no distinction with linear, square, or cubic units in ancient China). From the problem we obtain the equation:

# 240

(

1

1
2

)

x

{\displaystyle 240 = \left(1+\frac{1}{2} \right) x }

# 240

3
2

x

{\displaystyle 240 = \frac{3}{2} x }

# x
240
÷

3
2

{\displaystyle x = 240 \div \frac{3}{2} }

# x
240
×

2
3

{\displaystyle x = 240 \times \frac{2}{3} }

# x
160

{\displaystyle x = 160 }

Hence, the unknown length is 160 *bu*.

## **Cui fen Problems**

Chapter 3 of the *Jiuzhang Suanshu*, titled *Cui fen* (衰分, "proportional distribution"), is concerned with problems dividing some quantity among a given set of progressive rates. In ancient China, this type of problem was solved using a rule called the *cui fen* method (衰分術 *cui fen shu*). Although the method is calculated in an arithmetic manner, the principle behind the c*ui fen* method can be explained algebraically as the sum of linear terms. First, consider the progressive rates of distribution (列衰 *lie cui*) as the coefficients

a
1

,

a
2

,

a
3

,
.
.
.
,

a
n

{\displaystyle a\_1, a\_2, a\_3, ... , a\_n }

 that are multiplied to an unknown common factor

x

{\displaystyle x}

. The method then reduces to the linear equation

a
1

x

a
2

x

a
3

x
.
.
.

a
n

# x
b

{\displaystyle a\_1 x + a\_2 x + a\_3 x + ... + a\_n x = b }

, where

b

{\displaystyle b}

 is constant. A general description of the *cui fen* method is given at the start of Chapter 3 of the *Jiuzhang Suanshu*,

### **Problem Study 2: The Skilled Weaver**

答曰：初日織一寸、三十一分寸之十九；次日織三寸、三十一分寸之七；次日織六寸、三十一分寸之十四；次日織一尺二寸、三十一分寸之二十八；次日織二尺五寸、三十一分寸之二十五。

術曰：置一、二、四、八、十六為列衰，副并為法，以五尺乘未并者，各自為實，實如法得一尺。

Answer: The ﬁrst day she weaves

1

19
31

{\displaystyle 1\frac{19}{31} }

 *cun*; the next day she weaves

3

7
31

{\displaystyle 3\frac{7}{31} }

 *cun*; the next day she weaves

6

14
31

{\displaystyle 6\frac{14}{31} }

 *cun*; the next day she weaves

1

{\displaystyle 1}

*chi*

2

28
31

{\displaystyle 2\frac{28}{31} }

*cun*; the next day she weaves

2

{\displaystyle 2}

 *chi*

5

25
31

{\displaystyle 5\frac{25}{31} }

 *cun*.

Method: Set 1, 2, 4, 8, 16 as the progressive rates of distribution (列衰 *lie cui*); add these together as the divisor. Multiply 5 *chi* by each individual rate and let each be a dividend. Divide each dividend by the divisor to obtain the answer in *chi*.

**Solution for *Jiuzhang Suanshu* [3.04]**

The total length of the woven fabric after 5 days measures 5 *chi*, or 50 *cun*. Since the weaver doubles her product each successive day, the progressive rates of distribution (列衰 *lie cui*) are

1
,
2
,
4
,
8
,
16

{\displaystyle {1, 2, 4, 8, 16} }

. According to the solution method, the rates of distribution are added to make the divisor, and each rate multiplied by the total length are taken as separate dividends.

**Step 1: Calculating the divisor (法)**

Day 1:

1

{\displaystyle 1}

Day 2:

2

{\displaystyle 2}

Day 3:

4

{\displaystyle 4}

Day 4:

8

{\displaystyle 8}

Day 5:

16

{\displaystyle 16}

1
2
4
8
# 16
31

{\displaystyle 1 + 2 + 4 + 8 + 16 = 31 }

**Step 2: Calculating the individual dividends (實)**

Day 1:

50
×
# 1
50

{\displaystyle 50 \times 1 = 50 }

Day 2:

50
×
# 2
100

{\displaystyle 50 \times 2 = 100 }

Day 3:

50
×
# 4
200

{\displaystyle 50 \times 4 = 200 }

Day 4:

50
×
# 8
400

{\displaystyle 50 \times 8 = 400 }

Day 5:

50
×
# 16
800

{\displaystyle 50 \times 16 = 800 }

**Step 3: Divide each dividend by the divisor (實如法得一尺)**

Day 1:

50
31

=
1

19
31

{\displaystyle \frac{50}{31} = 1\frac{19}{31} }

Day 2:

100
31

=
3

7
31

{\displaystyle \frac{100}{31} = 3\frac{7}{31} }

Day 3:

200
31

=
6

14
31

{\displaystyle \frac{200}{31} = 6\frac{14}{31} }

Day 4:

400
31

=
12

28
31

{\displaystyle \frac{400}{31} = 12\frac{28}{31} }

Day 5:

800
31

=
25

25
31

{\displaystyle \frac{800}{31} = 25\frac{25}{31} }

Alternatively, this type of problem can be interpreted algebraically as

x
2
x
4
x
8
x
16
# x
50

c
u
n

{\displaystyle x + 2x + 4x + 8x + 16x = 50 \; cun }

which simplifies to

31
# x
50

c
u
n

{\displaystyle 31x = 50 \; cun }

Solving the equation gives

# x

50
31

c
u
n

{\displaystyle x = \frac{50}{31} \; cun }

Lastly, multiply the value

# x

50
31

{\displaystyle x = \frac{50}{31} }

 to each rate of distribution yields:

50
31

c
u
n
,

100
31

c
u
n
,

200
31

c
u
n
,

400
31

c
u
n
,

800
31

c
u
n

{\displaystyle \frac{50}{31} \; cun, \frac{100}{31} \; cun, \frac{200}{31} \; cun, \frac{400}{31} \; cun, \frac{800}{31} \; cun }

or

1

19
31

c
u
n
,
3

7
31

c
u
n
,
6

14
31

c
u
n
,
12

28
31

c
u
n
,
25

25
31

c
u
n

{\displaystyle 1\frac{19}{31} \; cun, 3\frac{7}{31} \; cun, 6\frac{14}{31} \; cun, 12\frac{28}{31} \; cun, 25\frac{25}{31} \; cun }

.
The last two lengths expressed as a combination of *chi* and *cun* becomes

1

c
h
i

2

28
31

c
u
n

{\displaystyle 1 \;chi \; 2\frac{28}{31} \; cun }

 and

2

c
h
i

5

25
31

c
u
n

{\displaystyle 2 \; chi \; 5\frac{25}{31} \; cun }

.

## **Ying bu zu Problems**

The *ying bu zu shu* (盈不足術, lit. "excess and deficiency method") is a linear interpolation algorithm from ancient China that is equivalent to the "rule double false position". The algorithm is found in several early mathematics texts, most notably the *Suan Shu Shu* and the *Jiuzhang Suanshu*. Chapter 7 of the *Jiuzhang Suanshu* presents 20 problems solved using this ingenious method. Each problem begins with "two false assumption" coordinates: one being an overestimate, or excess; the other being an underestimate, or deficiency. Both values are then substituted into a set formulas that gives the "right fit".

If one lets

(

a
1

,

b
1

)

{\displaystyle (a\_1, b\_1) }

 represent the excess,

(

a
2

,

b
2

)

{\displaystyle (a\_2, b\_2) }

 represent the deficiency,

x

{\displaystyle x}

 the number of people, and

y

{\displaystyle y}

 the price of the item, these problems can be modeled as a system of simultaneous linear equations in two unknowns:

{

a
1

x
−
# y

b
1

a
2

x
−
# y
−

b
2

{\displaystyle \begin{cases} a\_1 x - y = b\_1 \\ a\_2 x - y = - b\_2 \end{cases} }

According to the *Jiuzhang Suanshu*:

The above passage describes a series of steps to computing the desired quantities. It begins with the computation of the rate of cost per person:

y
x

=

a
1

b
2

a
2

b
1

b
1

b
2

{\displaystyle \frac{y}{x} = \frac{a\_1 b\_2 + a\_2 b\_1}{b\_1 + b\_2} }

This is incidentally the slope of a linear equation. The next step is to take the dividend (實 *shi*) and divisor (法 *fa*) of the rate and reduce (約 *yue*) each quantity by the difference

a
1

−

a
2

{\displaystyle |a\_1 - a\_2| }

 in order to obtain the number of people and the price of the item:

# x

b
1

b
2

a
1

−

a
2

{\displaystyle x = \frac{b\_1 + b\_2}{|a\_1 - a\_2|} }

# y

a
1

b
2

a
2

b
1

a
1

−

a
2

{\displaystyle y = \frac{a\_1 b\_2 + a\_2 b\_1}{|a\_1 - a\_2|} }

The *ying bu zu* method gives the exact solution for linear equations. Subsequently, when the *ying bu zu* method is used for solving systems of linear equations of two unknowns, it closely resembles the determinant calculations of Cramer's Rule.

### **Problem Study 3: Joint Purchase**

答曰：七人，物價五十三。

Answer: 7 people; price of the item is 53 [*qian*].

**Solution for *Jiuzhang Suanshu* [7.01]**

For this problem, the excess is

(

a
1

,

b
1

# )
(
8
,
3
)

{\displaystyle (a\_1, b\_1) = (8,3) }

 and the deficiency is

(

a
2

,

b
2

# )
(
7
,
4
)

{\displaystyle (a\_2, b\_2) = (7,4) }

. Substituting each value into the *ying bu zu* formulas yields:

# x

3
4

8
−
7

=
7

{\displaystyle x = \frac{3 + 4}{|8 - 7|} = 7 }

# y

8
×
4
7
×
3

8
−
7

=
53

{\displaystyle y = \frac{8 \times 4 + 7 \times 3}{|8 - 7|} = 53 }

Therefore there are 7 people purchasing one item that costs 53 *qian*.