section_path: Science and technology/Mathematics
section_name: Mathematics
paragraph_text: Mathematics
  
  Three Han mathematical treatises still exist. These are the Book on Numbers and Computation, the Zhoubi Suanjing, and the Nine Chapters on the Mathematical Art. Han mathematical achievements include solving problems with right triangles, square roots, cube roots, and matrix methods, finding more accurate approximations for pi, providing mathematical proof of the Pythagorean theorem, use of the decimal fraction, Gaussian elimination to solve linear equations, and continued fractions to find the roots of equations.
  
  One of the Han's greatest mathematical advancements was the world's first use of negative numbers. Negative numbers first appeared in the Nine Chapters on the Mathematical Art as black counting rods, where positive numbers were represented by red counting rods. Negative numbers were also used by the Greek mathematician Diophantus around AD 275, and in the 7th-century Bakhshali manuscript of Gandhara, South Asia, but were not widely accepted in Europe until the 16th century.
  
  The Han applied mathematics to various diverse disciplines. In musical tuning, Jing Fang (78–37 BC) realized that 53 perfect fifths was approximate to 31 octaves. He also created a musical scale of 60 tones, calculating the difference at ⁄ (the same value of 53 equal temperament discovered by the German mathematician Nicholas Mercator, i.e. 3 /2).