Figure 1
Linear Equations
1.1 Introduction to Linear Systems
Traditionally, algebra was the art of solving equations and systems of equations. The word algebra comes from the Arabic al-jabr (الجبر), which means restoration (of broken parts).1 The term was first used in a mathematical sense by Mohammed al-Khowarizmi (c. 780–850), who worked at the House of Wisdom, an academy established by Caliph al-Ma'mun in Baghdad. Linear algebra, then, is the art of solving systems of linear equations.
The need to solve systems of linear equations frequently arises in mathematics, statistics, physics, astronomy, engineering, computer science, and economics.
Solving systems of linear equations is not conceptually difficult. For small systems, ad hoc methods certainly suffice. Larger systems, however, require more systematic methods. The approach generally used today was beautifully explained 2,000 years ago in a Chinese text, the Nine Chapters on the Mathematical Art (Jiuzhang Suanshu, 九章算術).2 Chapter 8 of that text, called Method of Rectangular Arrays (Fang Cheng, 方程), contains the following problem:
The yield of one bundle of inferior rice, two bundles of medium-grade rice, and three bundles of superior rice is 39 dou of grain.3 The yield of one bundle of inferior rice, three bundles of medium-grade rice, and two bundles of superior rice is 34 dou. The yield of three bundles of inferior rice, two bundles of medium-grade rice, and one bundle of superior rice is 26 dou. What is the yield of one bundle of each grade of rice?
In this problem the unknown quantities are the yields of one bundle of inferior, one bundle of medium-grade, and one bundle of superior rice. Let us denote these quantities by \( x \), \( y \), and \( z \), respectively. The problem can then be represented by the
following system of linear equations:
\[ \left|\begin{array}{r} x + 2y + 3z = 39 \\ x + 3y + 2z = 34 \\ 3x + 2y + \ \ z = 26 \end{array}\right| . \]To solve for \( x \), \( y \), and \( z \), we need to transform this system from the form
\[ \left|\begin{array}{r} x + 2y + 3z = 39 \\ x + 3y + 2z = 34 \\ 3x + 2y + \ \ z = 26 \end{array}\right| \qquad \text{into the form} \qquad \left|\begin{array}{l} x \quad\ \ = \ldots \\ \ \ y \quad = \ldots \\ \quad\ z = \ldots \end{array}\right| . \]In other words, we need to eliminate the terms that are off the diagonal, those circled in the following equations, and make the coefficients of the variables along the diagonal equal to 1:
\[ \begin{array}{rcrcrcl} x &+& 2y &+& 3z &=& 39 \\ x &+& 3y &+& 2z &=& 34 \\ 3x &+& 2y &+& z &=& 26. \end{array} \]We can accomplish these goals step by step, one variable at a time. In the past, you may have simplified systems of equations by adding equations to one another or subtracting them. In this system, we can eliminate the variable \( x \) from the second equation by subtracting the first equation from the second:
\[ \left|\begin{array}{r} x + 2y + 3z = 39 \\ x + 3y + 2z = 34 \\ 3x + 2y + \ \ z = 26 \end{array}\right| \quad \begin{array}{c} \longrightarrow \\ -\text{1st equation} \end{array} \quad \left|\begin{array}{r} x + 2y + 3z = \ \ 39 \\ y - \ \ z = -5 \\ 3x + 2y + \ \ z = \ \ 26 \end{array}\right| . \]To eliminate the variable \( x \) from the third equation, we subtract the first equation from the third equation three times. We multiply the first equation by 3 to get
\[ 3x + 6y + 9z = 117 \qquad (3 \times \text{1st equation}) \]and then subtract this result from the third equation:
\[ \left|\begin{array}{r} x + 2y + 3z = \ \ 39 \\ y - \ \ z = -5 \\ 3x + 2y + \ \ z = \ \ 26 \end{array}\right| \quad \begin{array}{c} \longrightarrow \\ -3 \times \text{1st equation} \end{array} \quad \left|\begin{array}{r} x + 2y + 3z = \ \ \ \ 39 \\ y - \ \ z = \ \ -5 \\ -\,4y - 8z = -91 \end{array}\right| . \]Similarly, we eliminate the variable \( y \) above and below the diagonal:
\[ \left|\begin{array}{r} x + 2y + 3z = \ \ \ \ 39 \\ y - \ \ z = \ \ -5 \\ -\,4y - 8z = -91 \end{array}\right| \quad \begin{array}{c} -2 \times \text{2nd equation} \\ \longrightarrow \\ +4 \times \text{2nd equation} \end{array} \quad \left|\begin{array}{r} x \ \ + \ \ 5z = \ \ \ \ 49 \\ y - \ \ z = \ \ \ -5 \\ -\,12z = -111 \end{array}\right| . \]Before we eliminate the variable \( z \) above the diagonal, we make the coefficient of \( z \) on the diagonal equal to 1, by dividing the last equation by \( -12 \):
\[ \left|\begin{array}{r} x \ \ + \ \ 5z = \ \ \ \ 49 \\ y - \ \ z = \ \ \ -5 \\ -\,12z = -111 \end{array}\right| \quad \begin{array}{c} \longrightarrow \\ \div \, (-12) \end{array} \quad \left|\begin{array}{r} x \ \ + 5z = \ \ \ 49 \\ y - \ \ z = \ -5 \\ z = 9.25 \end{array}\right| . \]Finally, we eliminate the variable \( z \) above the diagonal:
\[ \left|\begin{array}{r} x \ \ + \ 5z = 49 \\ y \ - \ \ z = -5 \\ z = \ \ 9.25 \end{array}\right| \quad \begin{array}{c} -5 \times \text{third equation} \\ + \ \text{third equation} \\ \longrightarrow \end{array} \quad \left|\begin{array}{l} x \qquad = 2.75 \\ \ \ y \qquad = 4.25 \\ \qquad z = 9.25 \end{array}\right| . \]The yields of inferior, medium-grade, and superior rice are 2.75, 4.25, and 9.25 dou per bundle, respectively.
By substituting these values, we can check that \( x = 2.75 \), \( y = 4.25 \), \( z = 9.25 \) is indeed the solution of the system:
\[ \begin{array}{r} 2.75 + 2 \times 4.25 + 3 \times 9.25 = 39 \\ 2.75 + 3 \times 4.25 + 2 \times 9.25 = 34 \\ 3 \times 2.75 + 2 \times 4.25 + \ \ \ \ 9.25 = 26. \end{array} \]Happily, in linear algebra, you are almost always able to check your solutions. It will help you if you get into the habit of checking now.