Since Jiuzhang Suanshu, the main tools in the theory of right triangles, known as Gougushu in East Asia were algebraic identities about three sides of a right triangle derived from the Pythagorean theorem. Using tianyuanshu up to siyuanshu, Song-Yuan mathematicians could skip over those identities in the theory. Chinese Mathematics in the 17-18th centuries were mainly concerned with the identities along with the western geometrical proofs. Jeong Yag-yong (1762-1836), a well known Joseon scholar and writer of the school of Silhak, noticed that those identities can be derived through algebra and then wrote Gugo Wonlyu (勾股源流) in the early 19th century. We show that Jeong reveals the algebraic structure of polynomials with the three indeterminates in the book along with their order structure. Although the title refers to right triangles, it is the first pure algebra book in Joseon mathematics, if not in East Asia.