Systems of Linear Equations
In questa pagina 6
1. Linear equations
Definition. Let be fixed. An equation is a linear equation in the variables (unknowns) . More generally is a linear equation in . The real numbers are the coefficients, is the constant term. The solution set consists of all ordered tuples of numbers such that substituting makes the equation true: .
The word "linear" comes from the geometry of the solution sets.
Example. The equation (coefficients and , constant term ). Subtract : ; divide by : . Each step is an equivalence (one equation holds precisely if the next holds), so the solution set is an infinite set: a straight line in the plane.
In general with or has a line as solution set. If see the worked exercise in Section 6.
Remark (fields). Above we had to divide by , i.e. we needed the rational number . and are fieldssets in which one can add, subtract, multiply and divide by nonzero numbers with the usual rules, and so is (see Complex NumbersComplex numbers are pairs a+ib with i^2=-1; they have a conjugate, an absolute value, a trigonometric form where multiplication adds arguments, every non-constant polynomial has a root in them, and exp(ib)=cos b+i sin b.Complex Numbers →). The integers are not a field; solving linear systems over is harder. This course works over , except for eigenvalues, where complex numbers are unavoidable.
Remark (non-linear equations). Equations such as or are not studied in linear algebra; linear algebra still helps through linear approximations (the derivative is the best linear approximation of a differentiable function).
2. Systems of linear equations
Definition. A system of linear equations (linear system, system) is a collection of linear equations in the same variables. We look for the tuples satisfying all equations at once.
Example (unique solution). The system Solve the first equation for : . Substitute into the second: , i.e. , , . Back-substituting: . Each equation holds precisely if the preceding one holds, so the solution set is the single element .
Geometrically, each equation is a line, and two non-parallel lines meet in exactly one point.
Example (no solution). The system , has no solution: the two lines are parallel and distinct.
Example (infinitely many solutions). The system , has the solutions with arbitrary. Geometrically the same line is intersected with itself; one equation is redundant, and the solution set of the system equals that of either equation.
Summary. The solution set of is a line (unless ). The solution set of a system of two such equations can take exactly three forms:
| number of solutions | geometric explanation |
|---|---|
| exactly one | the unique intersection point of two non-parallel lines |
| none | two distinct parallel lines do not intersect |
| infinitely many | a line intersects itself in infinitely many points |
Definition. A homogeneous linear system is one in which all constant terms are ( in the notation below).
Remark. A homogeneous system always has at least one solution, , the trivial solution.
3. Elementary operations
Geometric intuition is of limited use with three variables and hardly any with four or more, so we develop systematic techniques.
Definition. Two linear systems are equivalent if they have the same solution set.
For example the system , is equivalent to , , from which the solution can be read off directly. The purpose of elementary operations is to turn a system into an equivalent one whose solutions can be read off.
Definition (elementary operations). On a linear system:
- interchange two equations;
- multiply one equation by a non-zero number;
- add a multiple of one equation to a different equation.
Theorem. A linear system is equivalent to (has the same solutions as) any system obtained from it by any number of elementary operations. (The source proves this later, once matrices are available; it is simple to grasp and extremely useful in practice.)
Example. Solve
- Add twice the first equation to the second (operation 3): .
- Interchange the second and third equations (operation 1): .
- Multiply the second equation by (operation 2): .
- Add times the third equation to the first (operation 3): .
By the theorem the original system has exactly this one solution: .
4. Matrices
Matrices help with the bookkeeping.
Definition. A matrix is a rectangular array of numbers. It is an -matrix (-by-) if it has rows and columns; if it is square. A -matrix is a row vector, an -matrix a column vector.
Examples. Matrices are denoted by capital letters: Entries may be variables: is a column vector (), a row vector ().
Notation. A matrix with unspecified entries is written The number is the entry in the -th row and -th column.
Definition (augmented matrix). For the linear system ( equations, unknowns , coefficients , constants ) the associated (augmented) matrix is the -matrix The vertical bar only reminds us that the last column holds the constants. The matrix records coefficients and constants and suppresses the variables.
Example. The system , has the associated matrix .
The process can be reversed: every -matrix defines a linear system. For example gives , .
5. Gaussian elimination
The theorem on elementary operations does not tell us how to simplify a system (arbitrary operations may not simplify it). Gaussian elimination is an algorithm that is guaranteed to give the simplest equivalent form. We phrase it for matrices first.
Definition (row-echelon form). A matrix is in row-echelon form if:
- zero rows (rows of only zeros), if any, are at the bottom;
- in a non-zero row, the first non-zero entry from the left is a , the leading 1;
- each leading 1 is to the right of all leading 1's in the rows above it.
If in addition each leading 1 is the only non-zero entry in its column, the matrix is in reduced row-echelon form.
Schematically (the stars are arbitrary numbers; for the reduced form all starred entries in the columns of the leading 1's must also be ):
0 1 * * 0 * * ...
0 0 0 0 1 * * ... staircase of leading 1's,
0 0 0 0 0 0 1 ... moving to the right as one goes down;
0 0 0 0 0 0 0 ... zero rows at the bottomDefinition (elementary row operations). On a matrix:
- interchange two rows;
- multiply a row by a non-zero number;
- add a multiple of a row to a different row.
Method (Gaussian algorithm). Every matrix can be brought to reduced row-echelon form by a sequence of elementary row operations:
- If the matrix consists only of zeros, stop (it is in reduced row-echelon form).
- Otherwise find the first column from the left with a non-zero entry . Interchange rows so that a row with this entry is at the top.
- Multiply the new top row by (possible since ), so that it has a leading 1.
- Add suitable multiples of the first row to the remaining rows so that all entries below the leading 1 are .
Now the first row is not touched anymore, and steps 1-4 are applied to the matrix of the remaining rows. This produces a (possibly not reduced) row-echelon form. Finally add suitable multiples of rows with leading 1's to the rows above them, starting from the bottom, to obtain the reduced form.
Example. Apply the algorithm to
- Steps 2 and 3 change nothing (the top-left entry is already ). Step 4: add row 1 to row 2 and row 1 to row 3:
- Restrict to rows 2 and 3. The first non-zero column is column 2, with already in the top position; multiply row 2 by :
- Step 4: add row 2 to row 3: Now only a zero row remains, so the algorithm stops: this is row-echelon form, but not reduced.
- To reduce, add row 2 to row 1:
Method (solving a linear system).
- Form the augmented matrix.
- Apply Gaussian elimination to get a reduced row-echelon matrix.
- If a row of the form occurs (it says ), the system has no solutions.
- Otherwise call the variables whose columns contain no leading 1 the free variables; they can take arbitrary real values. The variables whose columns contain a leading 1 (leading variables) are uniquely determined by the free ones: solve the equations of the echelon matrix for them.
Example. The system has the augmented matrix of the previous example. By the theorem on elementary operations it is equivalent to the system of the reduced matrix: The leading variables are ; is free. Then and , so the solution set consists of the triples (Check: substituting into the first equation gives .)
6. Worked exercises
The equation in all cases. If or there are infinitely many solutions: for subtract and divide by , so and is a solution for every ; similarly for . If : for the equation is true for every pair, so all of is the solution set (infinitely many solutions); for the left-hand side is always , so there is no solution.
One or two variables. The equation in one variable has the solution set , a point. Read as in the unknowns it has the solution set , the vertical line : adding a variable adds a dimension of solutions.
The three basic systems in matrix form.
- , : : unique solution .
- , : : the last row says , no solution.
- , : : is leading, free, solution set .
A system with a parameter. Solve , with : Both variables are leading, so for every the unique solution is , . Geometrically is a fixed line of slope , and is a family of parallel lines of slope (changing shifts the line); since the slopes differ, the lines always meet in exactly one point.
Versione ripasso
Definitions.
- Linear equation (coefficients , constant term ); linear system = several such equations in the same unknowns; homogeneous if all constants are (then , the trivial solution, always solves it). Equivalent systems have the same solution set.
- Over a fielda set with addition, subtraction, multiplication and division by nonzero elements () we can divide by nonzero numbers; is not a field.
- A solution set (two unknowns, two equations) is: one point, empty, or a whole line (infinitely many).
Elementary operations (on equations, or on rows of the matrix): (1) swap two; (2) multiply one by a non-zero number; (3) add a multiple of one to a different one. They preserve the solution set (Theorem: equivalent systems).
Matrices. : rows, columns; = row , column . The augmented matrix of a system has the coefficients and the constants in the last column.
Echelon forms.
- Row-echelon: zero rows at the bottom; first non-zero entry of each non-zero row is a leading 1; leading 1's move strictly to the right going down.
- Reduced: additionally each leading 1 is the only non-zero entry of its column.
Gaussian algorithm. Find the first non-zero column, bring a non-zero entry to the top, multiply that row by , clear the entries below; repeat on the remaining rows; finally clear entries above the leading 1's, from the bottom up.
Solving a system.
- Augmented matrix, then reduced row-echelon form.
- A row means no solution.
- Otherwise: columns without a leading 1 are free variables (arbitrary real parameters); the leading variables are expressed through them. No free variables means a unique solution.
Key examples. gives ; gives none; gives . A system with one free variable : solution .
Typical mistakes.
- Multiplying a row by (operation 2 requires non-zero) or adding a multiple of a row to itself (operation 3 requires a different row).
- Forgetting that a row is harmless but kills the system.
- Reading free variables off the rows instead of the columns without leading 1.
- Calling a row-echelon matrix "reduced" before clearing the entries above the leading 1's.