Linear Algebra/Print version/Part 1
This is the print version of Linear Algebra You won't see this message or any elements not part of the book's content when you print or preview this page. |

Table of Contents
![]() |
Linear Algebra is a featured book on Wikibooks because it contains substantial content, it is well-formatted, and the Wikibooks community has decided to feature it on the main page or in other places. Please continue to improve it and thanks for the great work so far! A {{Goodbook}} template should be created to advertise it. |
![]() |
This book requires that you are familiar with calculus. This subject is covered by the wikibook Calculus. |
This book discusses proof-based linear algebra. The book was designed specifically for students who have not previously been exposed to mathematics as mathematicians view it: that is, as a subject whose goal is to rigorously prove theorems starting from clear consistent definitions. This book attempts to build students up from a background where mathematics is simply a tool that provides useful calculations to the point where the students have a grasp of the clear and precise nature of mathematics. A more detailed discussion of the prerequisites and goal of this book is given in the introduction.
Because of the proof-based nature of this book, readers are recommended to be familiar with mathematical proof before reading this book (although this is not a prerequisite, strictly speaking), so that their reading experiences can be smoother. To gain familiarity with mathematical proof and also some basic mathematical concepts, readers may read the wikibook Mathematical Proof. For a milder introduction to linear algebra that is not too proof-based, see the wikibook Introductory Linear Algebra.
Table of Contents
This book is part of a series on Algebra:
Linear Systems
- Solving Linear Systems
- Linear Geometry of n-Space
- Reduced Echelon Form
- Topic: Computer Algebra Systems
- Topic: Input-Output Analysis
- Input-Output Analysis M File
- Topic: Accuracy of Computations
- Topic: Analyzing Networks
- Topic: Speed of Gauss' Method
- Definition of Vector Space
- Linear Independence
- Basis and Dimension
- Topic: Fields
- Topic: Crystals
- Topic: Voting Paradoxes
- Topic: Dimensional Analysis
Maps Between Spaces
- Isomorphisms
- Homomorphisms
- Computing Linear Maps
- Matrix Operations
- Change of Basis
- Projection
- Topic: Line of Best Fit
- Topic: Geometry of Linear Maps
- Topic: Markov Chains
- Topic: Orthonormal Matrices
- Definition
- Geometry of Determinants
- Other Formulas for Determinants
- Topic: Cramer's Rule
- Topic: Speed of Calculating Determinants
- Topic: Projective Geometry
- Complex Vector Spaces
- Similarity
- Nilpotence
- Jordan Form
- Topic: Geometry of Eigenvalues
- Topic: The Method of Powers
- Topic: Stable Populations
- Topic: Linear Recurrences
Unitary Transformations
The following is a brief overview of some basic concepts in mathematics. For more details, reader can read the wikibook Mathematical Proof.
Resources and Licensing
- Licensing And History
- Resources
- Bibliography (see individual pages for references)
- Index
Notation
, , | real numbers, reals greater than , ordered -tuples of reals |
| natural numbers: |
|
complex numbers |
|
set of . . . such that . . . |
, | interval (open or closed) of reals between and |
|
sequence; like a set but order matters |
|
vector spaces |
|
vectors |
, | zero vector, zero vector of |
|
bases |
| standard basis for |
|
basis vectors |
|
matrix representing the vector |
| set of -th degree polynomials |
| set of matrices |
| span of the set |
|
direct sum of subspaces |
|
isomorphic spaces |
|
homomorphisms, linear maps |
|
matrices |
|
transformations; maps from a space to itself |
|
square matrices |
| matrix representing the map |
| matrix entry from row , column |
| determinant of the matrix |
| rangespace and nullspace of the map |
|
generalized rangespace and nullspace |
Lower case Greek alphabet
About the Cover. This is Cramer's Rule for the system , . The size of the first box is the determinant shown (the absolute value of the size is the area). The size of the second box is times that, and equals the size of the final box. Hence, is the final determinant divided by the first determinant.
Introduction
This book helps students to master the material of a standard undergraduate linear algebra course.
The material is standard in that the topics covered are Gaussian reduction, vector spaces, linear maps, determinants, and eigenvalues and eigenvectors. The audience is also standard: sophomores or juniors, usually with a background of at least one semester of calculus and perhaps with as many as three semesters.
The help that it gives to students comes from taking a developmental approach—this book's presentation emphasizes motivation and naturalness, driven home by a wide variety of examples and extensive, careful, exercises. The developmental approach is what sets this book apart, so some expansion of the term is appropriate here.
Courses in the beginning of most mathematics programs reward students less for understanding the theory and more for correctly applying formulas and algorithms. Later courses ask for mathematical maturity: the ability to follow different types of arguments, a familiarity with the themes that underlie many mathematical investigations like elementary set and function facts, and a capacity for some independent reading and thinking. Linear algebra is an ideal spot to work on the transition between the two kinds of courses. It comes early in a program so that progress made here pays off later, but also comes late enough that students are often majors and minors. The material is coherent, accessible, and elegant. There are a variety of argument styles—proofs by contradiction, if and only if statements, and proofs by induction, for instance—and examples are plentiful.
So, the aim of this book's exposition is to help students develop from being successful at their present level, in classes where a majority of the members are interested mainly in applications in science or engineering, to being successful at the next level, that of serious students of the subject of mathematics itself.
Helping students make this transition means taking the mathematics seriously, so all of the results in this book are proved. On the other hand, we cannot assume that students have already arrived, and so in contrast with more abstract texts, we give many examples and they are often quite detailed.
In the past, linear algebra texts commonly made this transition abruptly. They began with extensive computations of linear systems, matrix multiplications, and determinants. When the concepts—vector spaces and linear maps—finally appeared, and definitions and proofs started, often the change brought students to a stop. In this book, while we start with a computational topic, linear reduction, from the first we do more than compute. We do linear systems quickly but completely, including the proofs needed to justify what we are computing. Then, with the linear systems work as motivation and at a point where the study of linear combinations seems natural, the second chapter starts with the definition of a real vector space. This occurs by the end of the third week.
Another example of our emphasis on motivation and naturalness is that the third chapter on linear maps does not begin with the definition of homomorphism, but with that of isomorphism. That's because this definition is easily motivated by the observation that some spaces are "just like" others. After that, the next section takes the reasonable step of defining homomorphism by isolating the operation-preservation idea. This approach loses mathematical slickness, but it is a good trade because it comes in return for a large gain in sensibility to students.
One aim of a developmental approach is that students should feel throughout the presentation that they can see how the ideas arise, and perhaps picture themselves doing the same type of work.
The clearest example of the developmental approach taken here—and the feature that most recommends this book—is the exercises. A student progresses most while doing the exercises, so they have been selected with great care. Each problem set ranges from simple checks to reasonably involved proofs. Since an instructor usually assigns about a dozen exercises after each lecture, each section ends with about twice that many, thereby providing a selection. There are even a few problems that are challenging puzzles taken from various journals, competitions, or problems collections. (These are marked with a "?" and as part of the fun, the original wording has been retained as much as possible.) In total, the exercises are aimed to both build an ability at, and help students experience the pleasure of, doing mathematics.
Applications and Computers.
The point of view taken here, that linear algebra is about vector spaces and linear maps, is not taken to the complete exclusion of others. Applications and the role of the computer are important and vital aspects of the subject. Consequently, each of this book's chapters closes with a few application or computer-related topics. Some are: network flows, the speed and accuracy of computer linear reductions, Leontief Input/Output analysis, dimensional analysis, Markov chains, voting paradoxes, analytic projective geometry, and difference equations.
These topics are brief enough to be done in a day's class or to be given as independent projects for individuals or small groups. Most simply give the reader a taste of the subject, discuss how linear algebra comes in, point to some further reading, and give a few exercises. In short, these topics invite readers to see for themselves that linear algebra is a tool that a professional must have.
For people reading this book on their own.
This book's emphasis on motivation and development make it a good choice for self-study. But, while a professional instructor can judge what pace and topics suit a class, if you are an independent student then perhaps you would find some advice helpful.
Here are two timetables for a semester. The first focuses on core material.
week | Monday | Wednesday | Friday |
1 | One.I.1 | One.I.1, 2 | One.I.2, 3 |
2 | One.I.3 | One.II.1 | One.II.2 |
3 | One.III.1, 2 | One.III.2 | Two.I.1 |
4 | Two.I.2 | Two.II | Two.III.1 |
5 | Two.III.1, 2 | Two.III.2 | Exam |
6 | Two.III.2, 3 | Two.III.3 | Three.I.1 |
7 | Three.I.2 | Three.II.1 | Three.II.2 |
8 | Three.II.2 | Three.II.2 | Three.III.1 |
9 | Three.III.1 | Three.III.2 | Three.IV.1, 2 |
10 | Three.IV.2, 3, 4 | Three.IV.4 | Exam |
11 | Three.IV.4, Three.V.1 | Three.V.1, 2 | Four.I.1, 2 |
12 | Four.I.3 | Four.II | Four.II |
13 | Four.III.1 | Five.I | Five.II.1 |
14 | Five.II.2 | Five.II.3 | Review |
The second timetable is more ambitious (it supposes that you know One.II, the elements of vectors, usually covered in third semester calculus).
week | Monday | Wednesday | Friday |
1 | One.I.1 | One.I.2 | One.I.3 |
2 | One.I.3 | One.III.1, 2 | One.III.2 |
3 | Two.I.1 | Two.I.2 | Two.II |
4 | Two.III.1 | Two.III.2 | Two.III.3 |
5 | Two.III.4 | Three.I.1 | Exam |
6 | Three.I.2 | Three.II.1 | Three.II.2 |
7 | Three.III.1 | Three.III.2 | Three.IV.1, 2 |
8 | Three.IV.2 | Three.IV.3 | Three.IV.4 |
9 | Three.V.1 | Three.V.2 | Three.VI.1 |
10 | Three.VI.2 | Four.I.1 | Exam |
11 | Four.I.2 | Four.I.3 | Four.I.4 |
12 | Four.II | Four.II, Four.III.1 | Four.III.2, 3 |
13 | Five.II.1, 2 | Five.II.3 | Five.III.1 |
14 | Five.III.2 | Five.IV.1, 2 | Five.IV.2 |
See the table of contents for the titles of these subsections.
To help you make time trade-offs, in the table of contents I have marked subsections as optional if some instructors will pass over them in favor of spending more time elsewhere. You might also try picking one or two topics that appeal to you from the end of each chapter. You'll get more from these if you have access to computer software that can do the big calculations.
The most important advice is: do many exercises. The recommended exercises are labeled throughout. (The answers are available.) You should be aware, however, that few inexperienced people can write correct proofs. Try to find a knowledgeable person to work with you on this.
Finally, if I may, a caution for all students, independent or not: I cannot overemphasize how much the statement that I sometimes hear, "I understand the material, but it's only that I have trouble with the problems" reveals a lack of understanding of what we are up to. Being able to do things with the ideas is their point. The quotes below express this sentiment admirably. They state what I believe is the key to both the beauty and the power of mathematics and the sciences in general, and of linear algebra in particular (I took the liberty of formatting them as poems).
I know of no better tactic
than the illustration of exciting principles
by well-chosen particulars.
--Stephen Jay Gould
If you really wish to learn
then you must mount the machine
and become acquainted with its tricks
by actual trial.
--Wilbur Wright
Jim Hefferon
Mathematics, Saint Michael's College
Colchester, Vermont USA 05439
http://joshua.smcvt.edu
2006-May-20
Author's Note. Inventing a good exercise, one that enlightens as well as tests, is a creative act, and hard work.
The inventor deserves recognition. But for some reason texts have traditionally not given attributions for questions. I have changed that here where I was sure of the source. I would greatly appreciate hearing from anyone who can help me to correctly attribute others of the questions.
Chapter I - Linear Systems
Section I - Solving Linear Systems
Systems of linear equations are common in science and mathematics. These two examples from high school science (O'Nan 1990) give a sense of how they arise.
The first example is from Physics. Suppose that we are given three objects, one with a mass known to be 2 kg, and are asked to find the unknown masses. Suppose further that experimentation with a meter stick produces two balances (one of which is depicted below).
![]() |
Since the sum of magnitudes of the torques of the clockwise forces equal those of the counter clockwise forces (the torque of an object rotating about a fixed origin is the cross product of the force on it and its position vector relative to the origin; gravitational acceleration is uniform we can divide both sides by it). The two balances give this system of two equations.
The second example of a linear system is from Chemistry. We can mix, under controlled conditions, toluene and nitric acid to produce trinitrotoluene along with the byproduct water (conditions have to be controlled very well, indeed— trinitrotoluene is better known as TNT). In what proportion should those components be mixed? The number of atoms of each element present before the reaction.
must equal the number present afterward. Applying that principle to the elements C, H, N, and O in turn gives this system.
To finish each of these examples requires solving a system of equations. In each, the equations involve only the first power of the variables. This chapter shows how to solve any such system.
1 - Gauss' Method
- Definition 1.1
A linear equation in variables has the form
where the numbers are the equation's coefficients and is the constant. An -tuple is a solution of, or satisfies, that equation if substituting the numbers for the variables gives a true statement: .
A system of linear equations
has the solution if that -tuple is a solution of all of the equations in the system.
- Example 1.2
The ordered pair is a solution of this system.
In contrast, is not a solution.
Finding the set of all solutions is solving the system. No guesswork or good fortune is needed to solve a linear system. There is an algorithm that always works. The next example introduces that algorithm, called Gauss' method. It transforms the system, step by step, into one with a form that is easily solved.
- Example 1.3
To solve this system
we repeatedly transform it until it is in a form that is easy to solve.
The third step is the only nontrivial one. We've mentally multiplied both sides of the first row by , mentally added that to the old second row, and written the result in as the new second row.
Now we can find the value of each variable. The bottom equation shows that . Substituting for in the middle equation shows that . Substituting those two into the top equation gives that and so the system has a unique solution: the solution set is .
Most of this subsection and the next one consists of examples of solving linear systems by Gauss' method. We will use it throughout this book. It is fast and easy. But, before we get to those examples, we will first show that this method is also safe in that it never loses solutions or picks up extraneous solutions.
- Theorem 1.4 (Gauss' method)
If a linear system is changed to another by one of these operations
- an equation is swapped with another
- an equation has both sides multiplied by a nonzero constant
- an equation is replaced by the sum of itself and a multiple of another
then the two systems have the same set of solutions.
Each of those three operations has a restriction. Multiplying a row by is not allowed because obviously that can change the solution set of the system. Similarly, adding a multiple of a row to itself is not allowed because adding times the row to itself has the effect of multiplying the row by . Finally, swapping a row with itself is disallowed to make some results in the fourth chapter easier to state and remember (and besides, self-swapping doesn't accomplish anything).
- Proof
We will cover the equation swap operation here and save the other two cases for Problem 14.
Consider this swap of row with row .
The -tuple satisfies the system before the swap if and only if substituting the values, the 's, for the variables, the 's, gives true statements:
and ...
and ...
and ... .
In a requirement consisting of statements and-ed together we can rearrange the order of the statements, so that this requirement is met if and only if and ... and ... and ... . This is exactly the requirement that solves the system after the row swap.
- Definition 1.5
The three operations from Theorem 1.4 are the elementary reduction operations, or row operations, or Gaussian operations. They are swapping, multiplying by a scalar or rescaling, and pivoting.
When writing out the calculations, we will abbreviate "row " by "". For instance, we will denote a pivot operation by , with the row that is changed written second. We will also, to save writing, often list pivot steps together when they use the same .
- Example 1.6
A typical use of Gauss' method is to solve this system.
The first transformation of the system involves using the first row to eliminate the in the second row and the in the third. To get rid of the second row's , we multiply the entire first row by , add that to the second row, and write the result in as the new second row. To get rid of the third row's , we multiply the first row by , add that to the third row, and write the result in as the new third row.
(Note that the two steps and are written as one operation.) In this second system, the last two equations involve only two unknowns. To finish we transform the second system into a third system, where the last equation involves only one unknown. This transformation uses the second row to eliminate from the third row.
Now we are set up for the solution. The third row shows that . Substitute that back into the second row to get , and then substitute back into the first row to get .
- Example 1.7
For the Physics problem from the start of this chapter, Gauss' method gives this.
So , and back-substitution gives that . (The Chemistry problem is solved later.)
- Example 1.8
The reduction
shows that , , and .
As these examples illustrate, Gauss' method uses the elementary reduction operations to set up back-substitution.
- Definition 1.9
In each row, the first variable with a nonzero coefficient is the row's leading variable. A system is in echelon form if each leading variable is to the right of the leading variable in the row above it (except for the leading variable in the first row).
- Example 1.10
The only operation needed in the examples above is pivoting. Here is a linear system that requires the operation of swapping equations. After the first pivot
the second equation has no leading . To get one, we look lower down in the system for a row that has a leading and swap it in.
(Had there been more than one row below the second with a leading then we could have swapped in any one.) The rest of Gauss' method goes as before.
Back-substitution gives , , , and .
Strictly speaking, the operation of rescaling rows is not needed to solve linear systems. We have included it because we will use it later in this chapter as part of a variation on Gauss' method, the Gauss-Jordan method.
All of the systems seen so far have the same number of equations as unknowns. All of them have a solution, and for all of them there is only one solution. We finish this subsection by seeing for contrast some other things that can happen.
- Example 1.11
Linear systems need not have the same number of equations as unknowns. This system
has more equations than variables. Gauss' method helps us understand this system also, since this
shows that one of the equations is redundant. Echelon form
gives and . The "" is derived from the redundancy.
That example's system has more equations than variables. Gauss' method is also useful on systems with more variables than equations. Many examples are in the next subsection.
Another way that linear systems can differ from the examples shown earlier is that some linear systems do not have a unique solution. This can happen in two ways.
The first is that it can fail to have any solution at all.
- Example 1.12
Contrast the system in the last example with this one.
Here the system is inconsistent: no pair of numbers satisfies all of the equations simultaneously. Echelon form makes this inconsistency obvious.
The solution set is empty.
- Example 1.13
The prior system has more equations than unknowns, but that is not what causes the inconsistency— Example 1.11 has more equations than unknowns and yet is consistent. Nor is having more equations than unknowns sufficient for inconsistency, as is illustrated by this inconsistent system with the same number of equations as unknowns.
The other way that a linear system can fail to have a unique solution is to have many solutions.
- Example 1.14
In this system
any pair of numbers satisfying the first equation automatically satisfies the second. The solution set is infinite; some of its members are , , and . The result of applying Gauss' method here contrasts with the prior example because we do not get a contradictory equation.
Don't be fooled by the "" equation in that example. It is not the signal that a system has many solutions.
- Example 1.15
The absence of a "" does not keep a system from having many different solutions. This system is in echelon form
has no "", and yet has infinitely many solutions. (For instance, each of these is a solution: , , , and . There are infinitely many solutions because any triple whose first component is and whose second component is the negative of the third is a solution.)
Nor does the presence of a "" mean that the system must have many solutions. Example 1.11 shows that. So does this system, which does not have many solutions— in fact it has none— despite that when it is brought to echelon form it has a "" row.
We will finish this subsection with a summary of what we've seen so far about Gauss' method.
Gauss' method uses the three row operations to set a system up for back substitution. If any step shows a contradictory equation then we can stop with the conclusion that the system has no solutions. If we reach echelon form without a contradictory equation, and each variable is a leading variable in its row, then the system has a unique solution and we find it by back substitution. Finally, if we reach echelon form without a contradictory equation, and there is not a unique solution (at least one variable is not a leading variable) then the system has many solutions.
The next subsection deals with the third case— we will see how to describe the solution set of a system with many solutions.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Use Gauss' method to find the unique solution for each system.
- This exercise is recommended for all readers.
- Problem 2
Use Gauss' method to solve each system or conclude "many solutions" or "no solutions".
- This exercise is recommended for all readers.
- Problem 3
There are methods for solving linear systems other than Gauss' method. One often taught in high school is to solve one of the equations for a variable, then substitute the resulting expression into other equations. That step is repeated until there is an equation with only one variable. From that, the first number in the solution is derived, and then back-substitution can be done. This method takes longer than Gauss' method, since it involves more arithmetic operations, and is also more likely to lead to errors. To illustrate how it can lead to wrong conclusions, we will use the system
from Example 1.12.
- Solve the first equation for and substitute that expression into the second equation. Find the resulting .
- Again solve the first equation for , but this time substitute that expression into the third equation. Find this .
What extra step must a user of this method take to avoid erroneously concluding a system has a solution?
- This exercise is recommended for all readers.
- Problem 4
For which values of are there no solutions, many solutions, or a unique solution to this system?
- This exercise is recommended for all readers.
- Problem 5
This system is not linear, in some sense,
and yet we can nonetheless apply Gauss' method. Do so. Does the system have a solution?
- This exercise is recommended for all readers.
- Problem 6
What conditions must the constants, the 's, satisfy so that each of these systems has a solution? Hint. Apply Gauss' method and see what happens to the right side (Anton 1987) .
- Problem 7
True or false: a system with more unknowns than equations has at least one solution. (As always, to say "true" you must prove it, while to say "false" you must produce a counterexample.)
- Problem 8
Must any Chemistry problem like the one that starts this subsection— a balance the reaction problem— have infinitely many solutions?
- This exercise is recommended for all readers.
- Problem 9
Find the coefficients , , and so that the graph of passes through the points , , and .
- Problem 10
Gauss' method works by combining the equations in a system to make new equations.
- Can the equation be derived, by a sequence of
Gaussian reduction steps, from the equations in this system?
- Can the equation be derived, by a sequence of
Gaussian reduction steps, from the equations in this system?
- Can the equation be derived,
by a sequence of
Gaussian reduction steps, from the equations in the system?
- Problem 11
Prove that, where are real numbers and , if
has the same solution set as
then they are the same equation. What if ?
- This exercise is recommended for all readers.
- Problem 12
Show that if then
has a unique solution.
- This exercise is recommended for all readers.
- Problem 13
In the system
each of the equations describes a line in the -plane. By geometrical reasoning, show that there are three possibilities: there is a unique solution, there is no solution, and there are infinitely many solutions.
- Problem 14
Finish the proof of Theorem 1.4.
- Problem 15
Is there a two-unknowns linear system whose solution set is all of ?
- This exercise is recommended for all readers.
- Problem 16
Are any of the operations used in Gauss' method redundant? That is, can any of the operations be synthesized from the others?
- Problem 17
Prove that each operation of Gauss' method is reversible. That is, show that if two systems are related by a row operation then there is a row operation to go back .
- ? Problem 18
A box holding pennies, nickels and dimes contains thirteen coins with a total value of cents. How many coins of each type are in the box? (Anton 1987)
- ? Problem 19
Four positive integers are given. Select any three of the integers, find their arithmetic average, and add this result to the fourth integer. Thus the numbers 29, 23, 21, and 17 are obtained. One of the original integers is:
- 19
- 21
- 23
- 29
- 17
(Salkind 1975, 1955 problem 38)
- This exercise is recommended for all readers.
- ? Problem 20
Laugh at this: . It resulted from substituting a code letter for each digit of a simple example in addition, and it is required to identify the letters and prove the solution unique (Ransom & Gupta 1935) .
- ? Problem 21
The Wohascum County Board of Commissioners, which has 20 members, recently had to elect a President. There were three candidates (, , and ); on each ballot the three candidates were to be listed in order of preference, with no abstentions. It was found that 11 members, a majority, preferred over (thus the other 9 preferred over ). Similarly, it was found that 12 members preferred over . Given these results, it was suggested that should withdraw, to enable a runoff election between and . However, protested, and it was then found that 14 members preferred over ! The Board has not yet recovered from the resulting confusion. Given that every possible order of , , appeared on at least one ballot, how many members voted for as their first choice (Gilbert, Krusemeyer & Larson 1993, Problem number 2) ?
- ? Problem 22
"This system of linear equations with unknowns," said the Great Mathematician, "has a curious property."
"Good heavens!" said the Poor Nut, "What is it?"
"Note," said the Great Mathematician, "that the constants are in arithmetic progression."
"It's all so clear when you explain it!" said the Poor Nut. "Do you mean like and ?"
"Quite so," said the Great Mathematician, pulling out his bassoon. "Indeed, even larger systems can be solved regardless of their progression. Can you find their solution?"
"Good heavens!" cried the Poor Nut, "I am baffled."
Are you? (Dudley, Lebow & Rothman 1963)
2 - Describing the Solution Set
A linear system with a unique solution has a solution set with one element. A linear system with no solution has a solution set that is empty. In these cases the solution set is easy to describe. Solution sets are a challenge to describe only when they contain many elements.
- Example 2.1
This system has many solutions because in echelon form
not all of the variables are leading variables. The Gauss' method theorem showed that a triple satisfies the first system if and only if it satisfies the third. Thus, the solution set can also be described as . However, this second description is not much of an improvement. It has two equations instead of three, but it still involves some hard-to-understand interaction among the variables.
To get a description that is free of any such interaction, we take the variable that does not lead any equation, , and use it to describe the variables that do lead, and . The second equation gives and the first equation gives . Thus, the solution set can be described as . For instance, is a solution because taking gives a first component of and a second component of .
The advantage of this description over the ones above is that the only variable appearing, , is unrestricted — it can be any real number.
- Definition 2.2
The non-leading variables in an echelon-form linear system are free variables.
In the echelon form system derived in the above example, and are leading variables and is free.
- Example 2.3
A linear system can end with more than one variable free. This row reduction
ends with and leading, and with both and free. To get the description that we prefer we will start at the bottom. We first express in terms of the free variables and with . Next, moving up to the top equation, substituting for in the first equation and solving for yields . Thus, the solution set is .
We prefer this description because the only variables that appear, and , are unrestricted. This makes the job of deciding which four-tuples are system solutions into an easy one. For instance, taking and gives the solution . In contrast, is not a solution, since the first component of any solution must be minus twice the third component plus twice the fourth.
- Example 2.4
After this reduction
lead, are free. The solution set is . For instance, satisfies the system — take and . The four-tuple is not a solution since its first coordinate does not equal its second.
We refer to a variable used to describe a family of solutions as a parameter and we say that the set above is parametrized with and . (The terms "parameter" and "free variable" do not mean the same thing. Above, and are free because in the echelon form system they do not lead any row. They are parameters because they are used in the solution set description. We could have instead parametrized with and by rewriting the second equation as . In that case, the free variables are still and , but the parameters are and . Notice that we could not have parametrized with and , so there is sometimes a restriction on the choice of parameters. The terms "parameter" and "free" are related because, as we shall show later in this chapter, the solution set of a system can always be parametrized with the free variables. Consequently, we shall parametrize all of our descriptions in this way.)
- Example 2.5
This is another system with infinitely many solutions.
The leading variables are . The variable is free. (Notice here that, although there are infinitely many solutions, the value of one of the variables is fixed — .) Write in terms of with . Then . To express in terms of , substitute for into the first equation to get . The solution set is .
We finish this subsection by developing the notation for linear systems and their solution sets that we shall use in the rest of this book.
- Definition 2.6
An matrix is a rectangular array of numbers with rows and columns. Each number in the matrix is an entry.
Matrices are usually named by upper case roman letters, e.g. . Each entry is denoted by the corresponding lower-case letter, e.g. is the number in row and column of the array. For instance,
has two rows and three columns, and so is a matrix. (Read that "two-by-three"; the number of rows is always stated first.) The entry in the second row and first column is . Note that the order of the subscripts matters: since . (The parentheses around the array are a typographic device so that when two matrices are side by side we can tell where one ends and the other starts.)
Matrices occur throughout this book. We shall use to denote the collection of matrices.
- Example 2.7
We can abbreviate this linear system
with this matrix.
The vertical bar just reminds a reader of the difference between the coefficients on the systems's left hand side and the constants on the right. When a bar is used to divide a matrix into parts, we call it an augmented matrix. In this notation, Gauss' method goes this way.
The second row stands for and the first row stands for so the solution set is . One advantage of the new notation is that the clerical load of Gauss' method — the copying of variables, the writing of 's and 's, etc. — is lighter.
We will also use the array notation to clarify the descriptions of solution sets. A description like from Example 2.3 is hard to read. We will rewrite it to group all the constants together, all the coefficients of together, and all the coefficients of together. We will write them vertically, in one-column wide matrices.
For instance, the top line says that . The next section gives a geometric interpretation that will help us picture the solution sets when they are written in this way.
- Definition 2.8
A vector (or column vector) is a matrix with a single column. A matrix with a single row is a row vector. The entries of a vector are its components.
Vectors are an exception to the convention of representing matrices with capital roman letters. We use lower-case roman or greek letters overlined with an arrow: ... or ... (boldface is also common: or ). For instance, this is a column vector with a third component of .
- Definition 2.9
The linear equation with unknowns is satisfied by
if . A vector satisfies a linear system if it satisfies each equation in the system.
The style of description of solution sets that we use involves adding the vectors, and also multiplying them by real numbers, such as the and . We need to define these operations.
- Definition 2.10
The vector sum of and is this.
In general, two matrices with the same number of rows and the same number of columns add in this way, entry-by-entry.
- Definition 2.11
The scalar multiplication of the real number and the vector is this.
In general, any matrix is multiplied by a real number in this entry-by-entry way.
Scalar multiplication can be written in either order: or , or without the "" symbol: . (Do not refer to scalar multiplication as "scalar product" because that name is used for a different operation.)
- Example 2.12
Notice that the definitions of vector addition and scalar multiplication agree where they overlap, for instance, .
With the notation defined, we can now solve systems in the way that we will use throughout this book.
- Example 2.13
This system
reduces in this way.
The solution set is . We write that in vector form.
Note again how well vector notation sets off the coefficients of each parameter. For instance, the third row of the vector form shows plainly that if is held fixed then increases three times as fast as .
That format also shows plainly that there are infinitely many solutions. For example, we can fix as , let range over the real numbers, and consider the first component . We get infinitely many first components and hence infinitely many solutions.
Another thing shown plainly is that setting both to 0 gives that this
is a particular solution of the linear system.
- Example 2.14
In the same way, this system
reduces
to a one-parameter solution set.
Before the exercises, we pause to point out some things that we have yet to do.
The first two subsections have been on the mechanics of Gauss' method. Except for one result, Theorem 1.4— without which developing the method doesn't make sense since it says that the method gives the right answers— we have not stopped to consider any of the interesting questions that arise.
For example, can we always describe solution sets as above, with a particular solution vector added to an unrestricted linear combination of some other vectors? The solution sets we described with unrestricted parameters were easily seen to have infinitely many solutions so an answer to this question could tell us something about the size of solution sets. An answer to that question could also help us picture the solution sets, in , or in , etc.
Many questions arise from the observation that Gauss' method can be done in more than one way (for instance, when swapping rows, we may have a choice of which row to swap with). Theorem 1.4 says that we must get the same solution set no matter how we proceed, but if we do Gauss' method in two different ways must we get the same number of free variables both times, so that any two solution set descriptions have the same number of parameters? Must those be the same variables (e.g., is it impossible to solve a problem one way and get and free or solve it another way and get and free)?
In the rest of this chapter we answer these questions. The answer to each is "yes". The first question is answered in the last subsection of this section. In the second section we give a geometric description of solution sets. In the final section of this chapter we tackle the last set of questions. Consequently, by the end of the first chapter we will not only have a solid grounding in the practice of Gauss' method, we will also have a solid grounding in the theory. We will be sure of what can and cannot happen in a reduction.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Find the indicated entry of the matrix, if it is defined.
- This exercise is recommended for all readers.
- Problem 2
Give the size of each matrix.
- This exercise is recommended for all readers.
- Problem 3
Do the indicated vector operation, if it is defined.
- This exercise is recommended for all readers.
- Problem 4
Solve each system using matrix notation. Express the solution using vectors.
- This exercise is recommended for all readers.
- Problem 5
Solve each system using matrix notation. Give each solution set in vector notation.
- This exercise is recommended for all readers.
- Problem 6
The vector is in the set. What value of the parameters produces that vector?
- ,
- ,
- ,
- Problem 7
Decide if the vector is in the set.
- ,
- ,
- ,
- ,
- Problem 8
Parametrize the solution set of this one-equation system.
- This exercise is recommended for all readers.
- Problem 9
- Apply Gauss' method to the left-hand side to solve
- Use your answer from the prior part to solve this.
- This exercise is recommended for all readers.
- Problem 10
Why is the comma needed in the notation "" for matrix entries?
- This exercise is recommended for all readers.
- Problem 11
Give the matrix whose -th entry is
- ;
- to the power.
- Problem 12
For any matrix , the transpose of , written , is the matrix whose columns are the rows of . Find the transpose of each of these.
- This exercise is recommended for all readers.
- Problem 13
- Describe all functions such that and .
- Describe all functions such that .
- Problem 14
Show that any set of five points from the plane lie on a common conic section, that is, they all satisfy some equation of the form where some of are nonzero.
- Problem 15
Make up a four equations/four unknowns system having
- a one-parameter solution set;
- a two-parameter solution set;
- a three-parameter solution set.
- ? Problem 16
- Solve the system of equations.
- Answer the above question for the system.
- ? Problem 17
In air a gold-surfaced sphere weighs grams. It is known that it may contain one or more of the metals aluminum, copper, silver, or lead. When weighed successively under standard conditions in water, benzene, alcohol, and glycerine its respective weights are , , , and grams. How much, if any, of the forenamed metals does it contain if the specific gravities of the designated substances are taken to be as follows?
Aluminum | 2.7 | Alcohol | 0.81 | ||
Copper | 8.9 | Benzene | 0.90 | ||
Gold | 19.3 | Glycerine | 1.26 | ||
Lead | 11.3 | Water | 1.00 | ||
Silver | 10.8 |
3 - General = Particular + Homogeneous
Description of Solution Sets
The prior subsection has many descriptions of solution sets. They all fit a pattern. They have a vector that is a particular solution of the system added to an unrestricted combination of some other vectors. The solution set from Example 2.13 illustrates.
The combination is unrestricted in that and can be any real numbers— there is no condition like "such that " that would restrict which pairs can be used to form combinations.
That example shows an infinite solution set conforming to the pattern. We can think of the other two kinds of solution sets as also fitting the same pattern. A one-element solution set fits in that it has a particular solution, and the unrestricted combination part is a trivial sum (that is, instead of being a combination of two vectors, as above, or a combination of one vector, it is a combination of no vectors). A zero-element solution set fits the pattern since there is no particular solution, and so the set of sums of that form is empty.
We will show that the examples from the prior subsection are representative, in that the description pattern discussed above holds for every solution set.
- Theorem 3.1
- For any linear system there are vectors , ..., such that the solution set can be described as
where is any particular solution, and where the system has free variables.
This description has two parts, the particular solution and also the unrestricted linear combination of the 's. We shall prove the theorem in two corresponding parts, with two lemmas.
Homogeneous Systems
We will focus first on the unrestricted combination part. To do that, we consider systems that have the vector of zeroes as one of the particular solutions, so that can be shortened to .
- Definition 3.2
A linear equation is homogeneous if it has a constant of zero, that is, if it can be put in the form .
(These are "homogeneous" because all of the terms involve the same power of their variable— the first power— including a "" that we can imagine is on the right side.)
- Example 3.3
With any linear system like
we associate a system of homogeneous equations by setting the right side to zeros.
Our interest in the homogeneous system associated with a linear system can be understood by comparing the reduction of the system
with the reduction of the associated homogeneous system.
Obviously the two reductions go in the same way. We can study how linear systems are reduced by instead studying how the associated homogeneous systems are reduced.
Studying the associated homogeneous system has a great advantage over studying the original system. Nonhomogeneous systems can be inconsistent. But a homogeneous system must be consistent since there is always at least one solution, the vector of zeros.
- Definition 3.4
A column or row vector of all zeros is a zero vector, denoted .
There are many different zero vectors, e.g., the one-tall zero vector, the two-tall zero vector, etc. Nonetheless, people often refer to "the" zero vector, expecting that the size of the one being discussed will be clear from the context.
- Example 3.5
Some homogeneous systems have the zero vector as their only solution.
- Example 3.6
Some homogeneous systems have many solutions. One example is the Chemistry problem from the first page of this book.
The solution set:
has many vectors besides the zero vector (if we interpret as a number of molecules then solutions make sense only when is a nonnegative multiple of ).
We now have the terminology to prove the two parts of Theorem 3.1. The first lemma deals with unrestricted combinations.
- Lemma 3.7
For any homogeneous linear system there exist vectors , ..., such that the solution set of the system is
where is the number of free variables in an echelon form version of the system.
Before the proof, we will recall the back substitution calculations that were done in the prior subsection.
Imagine that we have brought a system to this echelon form.
We next perform back-substitution to express each variable in terms of the free variable . Working from the bottom up, we get first that is , next that is , and then substituting those two into the top equation gives . So, back substitution gives a parametrization of the solution set by starting at the bottom equation and using the free variables as the parameters to work row-by-row to the top. The proof below follows this pattern.
Comment: That is, this proof just does a verification of the bookkeeping in back substitution to show that we haven't overlooked any obscure cases where this procedure fails, say, by leading to a division by zero. So this argument, while quite detailed, doesn't give us any new insights. Nevertheless, we have written it out for two reasons. The first reason is that we need the result— the computational procedure that we employ must be verified to work as promised. The second reason is that the row-by-row nature of back substitution leads to a proof that uses the technique of mathematical induction.[1] This is an important, and non-obvious, proof technique that we shall use a number of times in this book. Doing an induction argument here gives us a chance to see one in a setting where the proof material is easy to follow, and so the technique can be studied. Readers who are unfamiliar with induction arguments should be sure to master this one and the ones later in this chapter before going on to the second chapter.
- Proof
First use Gauss' method to reduce the homogeneous system to echelon form. We will show that each leading variable can be expressed in terms of free variables. That will finish the argument because then we can use those free variables as the parameters. That is, the 's are the vectors of coefficients of the free variables (as in Example 3.6, where the solution is , , , and ).
We will proceed by mathematical induction, which has two steps. The base step of the argument will be to focus on the bottom-most non-"" equation and write its leading variable in terms of the free variables. The inductive step of the argument will be to argue that if we can express the leading variables from the bottom rows in terms of free variables, then we can express the leading variable of the next row up— the -th row up from the bottom— in terms of free variables. With those two steps, the theorem will be proved because by the base step it is true for the bottom equation, and by the inductive step the fact that it is true for the bottom equation shows that it is true for the next one up, and then another application of the inductive step implies it is true for third equation up, etc.
For the base step, consider the bottom-most non-"" equation (the case where all the equations are "" is trivial). We call that the -th row:
where . (The notation here has "" stand for "leading", so means "the coefficient, from the row of the variable leading row ".) Either there are variables in this equation other than the leading one or else there are not. If there are other variables , etc., then they must be free variables because this is the bottom non-"" row. Move them to the right and divide by
to express this leading variable in terms of free variables. If there are no free variables in this equation then (see the "tricky point" noted following this proof).
For the inductive step, we assume that for the -th equation, and for the -th equation, ..., and for the -th equation, we can express the leading variable in terms of free variables (where ). To prove that the same is true for the next equation up, the -th equation, we take each variable that leads in a lower-down equation and substitute its expression in terms of free variables. The result has the form
where . We move the free variables to the right-hand side and divide by , to end with expressed in terms of free variables.
Because we have shown both the base step and the inductive step, by the principle of mathematical induction the proposition is true.
We say that the set is generated by or spanned by the set of vectors . There is a tricky point to this definition. If a homogeneous system has a unique solution, the zero vector, then we say the solution set is generated by the empty set of vectors. This fits with the pattern of the other solution sets: in the proof above the solution set is derived by taking the 's to be the free variables and if there is a unique solution then there are no free variables.
This proof incidentally shows, as discussed after Example 2.4, that solution sets can always be parametrized using the free variables.
Nonhomogeneous Systems
The next lemma finishes the proof of Theorem 3.1 by considering the particular solution part of the solution set's description.
- Lemma 3.8
For a linear system, where is any particular solution, the solution set equals this set.
- Proof
We will show mutual set inclusion, that any solution to the system is in the above set and that anything in the set is a solution to the system.[2]
For set inclusion the first way, that if a vector solves the system then it is in the set described above, assume that solves the system. Then solves the associated homogeneous system since for each equation index ,
where and are the -th components of and . We can write as , where solves the associated homogeneous system, to express in the required form.
For set inclusion the other way, take a vector of the form , where solves the system and solves the associated homogeneous system, and note that it solves the given system: for any equation index ,
where is the -th component of .
The two lemmas above together establish Theorem 3.1. We remember that theorem with the slogan "".
- Example 3.9
This system illustrates Theorem 3.1.
Gauss' method
shows that the general solution is a singleton set.
That single vector is, of course, a particular solution. The associated homogeneous system reduces via the same row operations
to also give a singleton set.
As the theorem states, and as discussed at the start of this subsection, in this single-solution case the general solution results from taking the particular solution and adding to it the unique solution of the associated homogeneous system.
- Example 3.10
Also discussed there is that the case where the general solution set is empty fits the "" pattern. This system illustrates Gauss' method
shows that it has no solutions. The associated homogeneous system, of course, has a solution.
In fact, the solution set of the homogeneous system is infinite.
However, because no particular solution of the original system exists, the general solution set is empty— there are no vectors of the form because there are no 's.
- Corollary 3.11
Solution sets of linear systems are either empty, have one element, or have infinitely many elements.
- Proof
We've seen examples of all three happening so we need only prove that those are the only possibilities.
First, notice a homogeneous system with at least one non- solution has infinitely many solutions because the set of multiples is infinite— if then is easily seen to be non-, and so .
Now, apply Lemma 3.8 to conclude that a solution set
is either empty (if there is no particular solution ), or has one element (if there is a and the homogeneous system has the unique solution ), or is infinite (if there is a and the homogeneous system has a non- solution, and thus by the prior paragraph has infinitely many solutions).
This table summarizes the factors affecting the size of a general solution.
number of solutions of the associated homogeneous system |
||||
one | infinitely many | |||
particular solution exists? |
yes | unique solution |
infinitely many solutions | |
no | no solutions |
no solutions |
The factor on the top of the table is the simpler one. When we perform Gauss' method on a linear system, ignoring the constants on the right side and so paying attention only to the coefficients on the left-hand side, we either end with every variable leading some row or else we find that some variable does not lead a row, that is, that some variable is free. (Of course, "ignoring the constants on the right" is formalized by considering the associated homogeneous system. We are simply putting aside for the moment the possibility of a contradictory equation.)
A nice insight into the factor on the top of this table at work comes from considering the case of a system having the same number of equations as variables. This system will have a solution, and the solution will be unique, if and only if it reduces to an echelon form system where every variable leads its row, which will happen if and only if the associated homogeneous system has a unique solution. Thus, the question of uniqueness of solution is especially interesting when the system has the same number of equations as variables.
- Definition 3.12
A square matrix is nonsingular if it is the matrix of coefficients of a homogeneous system with a unique solution. It is singular otherwise, that is, if it is the matrix of coefficients of a homogeneous system with infinitely many solutions.
- Example 3.13
The systems from Example 3.3, Example 3.5, and Example 3.9 each have an associated homogeneous system with a unique solution. Thus these matrices are nonsingular.
The Chemistry problem from Example 3.6 is a homogeneous system with more than one solution so its matrix is singular.
- Example 3.14
The first of these matrices is nonsingular while the second is singular
because the first of these homogeneous systems has a unique solution while the second has infinitely many solutions.
We have made the distinction in the definition because a system (with the same number of equations as variables) behaves in one of two ways, depending on whether its matrix of coefficients is nonsingular or singular. A system where the matrix of coefficients is nonsingular has a unique solution for any constants on the right side: for instance, Gauss' method shows that this system
has the unique solution and . On the other hand, a system where the matrix of coefficients is singular never has a unique solution— it has either no solutions or else has infinitely many, as with these.
Thus, "singular" can be thought of as connoting "troublesome", or at least "not ideal".
The above table has two factors. We have already considered the factor along the top: we can tell which column a given linear system goes in solely by considering the system's left-hand side— the constants on the right-hand side play no role in this factor. The table's other factor, determining whether a particular solution exists, is tougher. Consider these two
with the same left sides but different right sides. Obviously, the first has a solution while the second does not, so here the constants on the right side decide if the system has a solution. We could conjecture that the left side of a linear system determines the number of solutions while the right side determines if solutions exist, but that guess is not correct. Compare these two systems
with the same right sides but different left sides. The first has a solution but the second does not. Thus the constants on the right side of a system don't decide alone whether a solution exists; rather, it depends on some interaction between the left and right sides.
For some intuition about that interaction, consider this system with one of the coefficients left as the parameter .
If this system has no solution because the left-hand side has the third row as a sum of the first two, while the right-hand does not. If this system has a unique solution (try it with ). For a system to have a solution, if one row of the matrix of coefficients on the left is a linear combination of other rows, then on the right the constant from that row must be the same combination of constants from the same rows.
More intuition about the interaction comes from studying linear combinations. That will be our focus in the second chapter, after we finish the study of Gauss' method itself in the rest of this chapter.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Solve each system. Express the solution set using vectors. Identify the particular solution and the solution set of the homogeneous system.
- Problem 2
Solve each system, giving the solution set in vector notation. Identify the particular solution and the solution of the homogeneous system.
- This exercise is recommended for all readers.
- Problem 3
For the system
which of these can be used as the particular solution part of some general solution?
- This exercise is recommended for all readers.
- Problem 4
Lemma 3.8 says that any particular solution may be used for . Find, if possible, a general solution to this system
that uses the given vector as its particular solution.
- Problem 5
One of these is nonsingular while the other is singular. Which is which?
- This exercise is recommended for all readers.
- Problem 6
Singular or nonsingular?
- (Careful!)
- This exercise is recommended for all readers.
- Problem 7
Is the given vector in the set generated by the given set?
- Problem 8
Prove that any linear system with a nonsingular matrix of coefficients has a solution, and that the solution is unique.
- Problem 9
To tell the whole truth, there is another tricky point to the proof of Lemma 3.7. What happens if there are no non-"" equations? (There aren't any more tricky points after this one.)
- This exercise is recommended for all readers.
- Problem 10
Prove that if and satisfy a homogeneous system then so do these vectors.
- for
What's wrong with: "These three show that if a homogeneous system has one solution then it has many solutions— any multiple of a solution is another solution, and any sum of solutions is a solution also— so there are no homogeneous systems with exactly one solution."?
- Problem 11
Prove that if a system with only rational coefficients and constants has a solution then it has at least one all-rational solution. Must it have infinitely many?
Footnotes
- ↑ More information on mathematical induction is in the appendix.
- ↑ More information on equality of sets is in the appendix.
4 - Comparing Set Descriptions
This subsection is optional. Later material will not require the work here.
Comparing Set Descriptions
A set can be described in many different ways. Here are two different descriptions of a single set:
For instance, this set contains
(take and ) but does not contain
(the first component gives but that clashes with the third component, similarly the first component gives but the third component gives something different). Here is a third description of the same set:
We need to decide when two descriptions are describing the same set. More pragmatically stated, how can a person tell when an answer to a homework question describes the same set as the one described in the back of the book?
Set Equality
Sets are equal if and only if they have the same members. A common way to show that two sets, and , are equal is to show mutual inclusion: any member of is also in , and any member of is also in .[1]
- Example 4.1
To show that
equals
we show first that and then that .
For the first half we must check that any vector from is also in . We first consider two examples to use them as models for the general argument. If we make up a member of by trying and , then to show that it is in we need and such that
that is, this relation holds between and .
Similarly, if we try and , then to show that the resulting member of is in we need and such that
that is, this holds.
In the general case, to show that any vector from is a member of we must show that for any and there are appropriate and . We follow the pattern of the examples; fix
and look for and such that
that is, this is true.
Applying Gauss' method
gives and . This shows that for any choice of and there are appropriate and . We conclude any member of is a member of because it can be rewritten in this way:
For the other inclusion, , we want to do the opposite. We want to show that for any choice of and there are appropriate and . So fix and and solve for and :
shows that and . Thus any vector from
is also of the right form for
- Example 4.2
Of course, sometimes sets are not equal. The method of the prior example will help us see the relationship between the two sets. These
are not equal sets. While is a subset of , it is a proper subset of because is not a subset of .
To see that, observe first that given a vector from we can express it in the form for — if we fix and , we can solve for appropriate , , and :
shows that that any
can be expressed as a member of with , , and :
Thus .
But, for the other direction, the reduction resulting from fixing , , and and looking for and
shows that the only vectors
representable in the form
are those where . For instance,
is in but not in .
Exercises
- Problem 1
Decide if the vector is a member of the set.
- ,
- ,
- ,
- ,
- ,
- ,
- Problem 2
Produce two descriptions of this set that are different than this one.
- This exercise is recommended for all readers.
- Problem 3
Show that the three descriptions given at the start of this subsection all describe the same set.
- This exercise is recommended for all readers.
- Problem 4
Show that these sets are equal
and that both describe the solution set of this system.
- This exercise is recommended for all readers.
- Problem 5
Decide if the sets are equal.
- and
- and
- and
- and
- and
Footnotes
- ↑ More information on set equality is in the appendix.
5 - Automation
This is a PASCAL routine to do to an augmented matrix.
PROCEDURE Pivot(VAR LinSys : AugMat;
k : REAL;
i, j : INTEGER)
VAR
Col : INTEGER;
BEGIN
FOR Col:=1 TO NumVars+1 DO
LinSys[j,Col]:=k*LinSys[i,Col]+LinSys[j,Col];
END;
Of course this is only one part of a whole program, but it makes the point that Gaussian reduction is ideal for computer coding.
There are pitfalls, however. For example, some arise from the computer's use of finite-precision approximations of real numbers.
These systems provide a simple example.

(The second two lines are hard to tell apart.) Both have as their unique solution.
In the first system, some small change in the numbers will produce only a small change in the solution:
gives a solution of . Geometrically, changing one of the lines by a small amount does not change the intersection point by very much.
That's not true for the second system. A small change in the coefficients
leads to a completely different answer: .
The solution of the second example varies wildly, depending on a -th digit. That's bad news for a machine using digits to represent reals. In short, systems that are nearly singular may be hard to compute with.
Another thing that can go wrong is error propagation. In a system with a large number of equations (say, 100 or more), small rounding errors early in the procedure can snowball to overwhelm the solution at the end.
These issues, and many others like them, are outside the scope of this book, but remember that just because Gauss' method always works in theory and just because a program correctly implements that method and just because the answer appears on green-bar paper, doesn't mean that answer is right. In practice, always use a package where experts have worked hard to counter what can go wrong.
Section II - Linear Geometry of n-Space
For readers who have seen the elements of vectors before, in calculus or physics, this section is an optional review. However, later work will refer to this material so it is not optional if it is not a review.
In the first section, we had to do a bit of work to show that there are only three types of solution sets— singleton, empty, and infinite. But in the special case of systems with two equations and two unknowns this is easy to see. Draw each two-unknowns equation as a line in the plane and then the two lines could have a unique intersection, be parallel, or be the same line.
Unique solution | No solutions | Infinitely many solutions |
![]()
| ![]()
| ![]()
|
These pictures don't prove the results from the prior section, which apply to any number of linear equations and any number of unknowns, but nonetheless they do help us to understand those results. This section develops the ideas that we need to express our results from the prior section, and from some future sections, geometrically. In particular, while the two-dimensional case is familiar, to extend to systems with more than two unknowns we shall need some higher-dimensional geometry.
1 - Vectors in Space
"Higher-dimensional geometry" sounds exotic. It is exotic— interesting and eye-opening. But it isn't distant or unreachable.
We begin by defining one-dimensional space to be the set . To see that definition is reasonable, draw a one-dimensional space

and make the usual correspondence with : pick a point to label and another to label .

Now, with a scale and a direction, finding the point corresponding to, say , is easy— start at and head in the direction of (i.e., the positive direction), but don't stop there, go times as far.
The basic idea here, combining magnitude with direction, is the key to extending to higher dimensions.
An object comprised of a magnitude and a direction is a vector (we will use the same word as in the previous section because we shall show below how to describe such an object with a column vector). We can draw a vector as having some length, and pointing somewhere.

There is a subtlety here— these vectors

are equal, even though they start in different places, because they have equal lengths and equal directions. Again: those vectors are not just alike, they are equal.
How can things that are in different places be equal? Think of a vector as representing a displacement ("vector" is Latin for "carrier" or "traveler"). These squares undergo the same displacement, despite that those displacements start in different places.

Sometimes, to emphasize this property vectors have of not being anchored, they are referred to as free vectors. Thus, these free vectors are equal as each is a displacement of one over and two up.

More generally, vectors in the plane are the same if and only if they have the same change in first components and the same change in second components: the vector extending from to equals the vector from to if and only if and .
An expression like "the vector that, were it to start at , would extend to " is awkward. We instead describe such a vector as
so that, for instance, the "one over and two up" arrows shown above picture this vector.
We often draw the arrow as starting at the origin, and we then say it is in the canonical position (or natural position). When the vector
is in its canonical position then it extends to the endpoint .
We typically just refer to "the point
- "
rather than "the endpoint of the canonical position of" that vector.
Thus, we will call both of these sets .
In the prior section we defined vectors and vector operations with an algebraic motivation;
we can now interpret those operations geometrically. For instance, if represents a displacement then represents a displacement in the same direction but three times as far, and represents a displacement of the same distance as but in the opposite direction.

And, where and represent displacements, represents those displacements combined.

The long arrow is the combined displacement in this sense: if, in one minute, a ship's motion gives it the displacement relative to the earth of and a passenger's motion gives a displacement relative to the ship's deck of , then is the displacement of the passenger relative to the earth.
Another way to understand the vector sum is with the parallelogram rule. Draw the parallelogram formed by the vectors and then the sum extends along the diagonal to the far corner.

The above drawings show how vectors and vector operations behave in . We can extend to , or to even higher-dimensional spaces where we have no pictures, with the obvious generalization: the free vector that, if it starts at , ends at , is represented by this column
(vectors are equal if they have the same representation), we aren't too careful to distinguish between a point and the vector whose canonical representation ends at that point,
and addition and scalar multiplication are component-wise.
Having considered points, we now turn to the lines.
In , the line through and s comprised of (the endpoints of) the vectors in this set
That description expresses this picture.

The vector associated with the parameter has its whole body in the line— it is a direction vector for the line. Note that points on the line to the left of are described using negative values of .
In , the line through and is the set of (endpoints of) vectors of this form

and lines in even higher-dimensional spaces work in the same way.
If a line uses one parameter, so that there is freedom to move back and forth in one dimension, then a plane must involve two. For example, the plane through the points , , and consists of (endpoints of) the vectors in
(the column vectors associated with the parameters
are two vectors whose whole bodies lie in the plane). As with the line, note that some points in this plane are described with negative 's or negative 's or both.
A description of planes that is often encountered in algebra and calculus uses a single equation as the condition that describes the relationship among the first, second, and third coordinates of points in a plane.

The translation from such a description to the vector description that we favor in this book is to think of the condition as a one-equation linear system and parametrize .

Generalizing from lines and planes, we define a -dimensional linear surface (or -flat) in to be where . For example, in ,
is a line,
is a plane, and
is a three-dimensional linear surface. Again, the intuition is that a line permits motion in one direction, a plane permits motion in combinations of two directions, etc.
A linear surface description can be misleading about the dimension— this
is a degenerate plane because it is actually a line.
We shall see in the Linear Independence section of Chapter Two what relationships among vectors causes the linear surface they generate to be degenerate.
We finish this subsection by restating our conclusions from the first section in geometric terms. First, the solution set of a linear system with unknowns is a linear surface in . Specifically, it is a -dimensional linear surface, where is the number of free variables in an echelon form version of the system. Second, the solution set of a homogeneous linear system is a linear surface passing through the origin. Finally, we can view the general solution set of any linear system as being the solution set of its associated homogeneous system offset from the origin by a vector, namely by any particular solution.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Find the canonical name for each vector.
- the vector from to in
- the vector from to in
- the vector from to in
- the vector from to in
- This exercise is recommended for all readers.
- Problem 2
Decide if the two vectors are equal.
- the vector from to and the vector from to
- the vector from to and the vector from to
- This exercise is recommended for all readers.
- Problem 3
Does lie on the line through and ?
- This exercise is recommended for all readers.
- Problem 4
- Describe the plane through , , and .
- Is the origin in that plane?
- Problem 5
Describe the plane that contains the following point and line.
- This exercise is recommended for all readers.
- Problem 6
Find the intersection of these planes:
- This exercise is recommended for all readers.
- Problem 7
Find the intersection of each of the following pair, if possible.
- Problem 8
When a plane does not pass through the origin, performing operations on vectors whose bodies lie in it is more complicated than when the plane passes through the origin. Consider the picture in this subsection of the plane
and the three vectors it shows, with endpoints , , and .
- Redraw the picture, including the vector in the plane that is twice as long as the one with endpoint . The endpoint of your vector is not ; what is it?
- Redraw the picture, including the parallelogram in the plane that shows the sum of the vectors ending at and . The endpoint of the sum, on the diagonal, is not ; what is it?
- Problem 9
Show that the line segments and have the same lengths and slopes if and . Can we replace 'if' by 'if and only if'?
- Problem 10
How should be defined?
- This exercise is recommended for all readers.
- ? Problem 11
A person traveling eastward at a rate of miles per hour finds that the wind appears to blow directly from the north. On doubling his speed it appears to come from the north east. What was the wind's velocity? (Klamkin 1957)
- This exercise is recommended for all readers.
- Problem 12
Euclid describes a plane as "a surface which lies evenly with the straight lines on itself". Commentators (e.g., Heron) have interpreted this to mean "(A plane surface is) such that, if a straight line pass through two points on it, the line coincides wholly with it at every spot, all ways". (Translations from Heath 1956, pp. 171-172. ) Do planes, as described in this section, have that property? Does this description adequately define planes?
2 - Length and Angle Measures
We've translated the first section's results about solution sets into geometric terms for insight into how those sets look. But we must watch out not to be mislead by our own terms; labeling subsets of of the forms and as "lines" and "planes" doesn't make them act like the lines and planes of our prior experience. Rather, we must ensure that the names suit the sets. While we can't prove that the sets satisfy our intuition— we can't prove anything about intuition— in this subsection we'll observe that a result familiar from and , when generalized to arbitrary , supports the idea that a line is straight and a plane is flat. Specifically, we'll see how to do Euclidean geometry in a "plane" by giving a definition of the angle between two vectors in the plane that they generate.
- Definition 2.1
The length of a vector is this.
- Remark 2.2
This is a natural generalization of the Pythagorean Theorem. A classic discussion is in (Pólya 1954) .
We can use that definition to derive a formula for the angle between two vectors. For a model of what to do, consider two vectors in .
Put them in canonical position and, in the plane that they determine, consider the triangle formed by , , and .
Apply the Law of Cosines, , where is the angle between the vectors. Expand both sides
and simplify.
In higher dimensions no picture suffices but we can make the same argument analytically. First, the form of the numerator is clear— it comes from the middle terms of the squares , , etc.
- Definition 2.3
The dot product (or inner product, or scalar product) of two -component real vectors is the linear combination of their components.
Note that the dot product of two vectors is a real number, not a vector, and that the dot product of a vector from with a vector from is defined only when equals . Note also this relationship between dot product and length: dotting a vector with itself gives its length squared .
- Remark 2.4
The wording in that definition allows one or both of the two to be a row vector instead of a column vector. Some books require that the first vector be a row vector and that the second vector be a column vector. We shall not be that strict.
Still reasoning with letters, but guided by the pictures, we use the next theorem to argue that the triangle formed by , , and in lies in the planar subset of generated by and .
- Theorem 2.5 (Triangle Inequality)
For any ,
with equality if and only if one of the vectors is a nonnegative scalar multiple of the other one.
This inequality is the source of the familiar saying, "The shortest distance between two points is in a straight line."
- Proof
(We'll use some algebraic properties of dot product that we have not yet checked, for instance that and that . See Problem 8.) The desired inequality holds if and only if its square holds.
That, in turn, holds if and only if the relationship obtained by multiplying both sides by the nonnegative numbers and
and rewriting
is true. But factoring
shows that this certainly is true since it only says that the square of the length of the vector is not negative.
As for equality, it holds when, and only when, is . The check that if and only if one vector is a nonnegative real scalar multiple of the other is easy.
This result supports the intuition that even in higher-dimensional spaces, lines are straight and planes are flat. For any two points in a linear surface, the line segment connecting them is contained in that surface (this is easily checked from the definition). But if the surface has a bend then that would allow for a shortcut (shown here grayed, while the segment from to that is contained in the surface is solid).
Because the Triangle Inequality says that in any , the shortest cut between two endpoints is simply the line segment connecting them, linear surfaces have no such bends.
Back to the definition of angle measure. The heart of the Triangle Inequality's proof is the "" line. At first glance, a reader might wonder if some pairs of vectors satisfy the inequality in this way: while is a large number, with absolute value bigger than the right-hand side, it is a negative large number. The next result says that no such pair of vectors exists.
- Corollary 2.6 (Cauchy-Schwarz Inequality)
For any ,
with equality if and only if one vector is a scalar multiple of the other.
- Proof
The Triangle Inequality's proof shows that so if is positive or zero then we are done. If is negative then this holds.
The equality condition is Problem 9.
The Cauchy-Schwarz inequality assures us that the next definition makes sense because the fraction has absolute value less than or equal to one.
- Definition 2.7
The angle between two nonzero vectors is
(the angle between the zero vector and any other vector is defined to be a right angle).
Thus vectors from are orthogonal (or perpendicular) if and only if their dot product is zero.
- Example 2.8
These vectors are orthogonal.
![]() |
The arrows are shown away from canonical position but nevertheless the vectors are orthogonal.
- Example 2.9
The angle formula given at the start of this subsection is a special case of the definition. Between these two
the angle is
approximately . Notice that these vectors are not orthogonal. Although the -plane may appear to be perpendicular to the -plane, in fact the two planes are that way only in the weak sense that there are vectors in each orthogonal to all vectors in the other. Not every vector in each is orthogonal to all vectors in the other.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Find the length of each vector.
- This exercise is recommended for all readers.
- Problem 2
Find the angle between each two, if it is defined.
- This exercise is recommended for all readers.
- Problem 3
During maneuvers preceding the Battle of Jutland, the British battle cruiser Lion moved as follows (in nautical miles): miles north, miles degrees east of south, miles at degrees east of north, and miles at degrees east of north. Find the distance between starting and ending positions (O'Hanian 1985) .
- Problem 4
Find so that these two vectors are perpendicular.
- Problem 5
Describe the set of vectors in orthogonal to this one.
- This exercise is recommended for all readers.
- Problem 6
- Find the angle between the diagonal of the unit square in and one of the axes.
- Find the angle between the diagonal of the unit cube in and one of the axes.
- Find the angle between the diagonal of the unit cube in and one of the axes.
- What is the limit, as goes to , of the angle between the diagonal of the unit cube in and one of the axes?
- Problem 7
Is any vector perpendicular to itself?
- This exercise is recommended for all readers.
- Problem 8
Describe the algebraic properties of dot product.
- Is it right-distributive over addition: ?
- Is is left-distributive (over addition)?
- Does it commute?
- Associate?
- How does it interact with scalar multiplication?
As always, any assertion must be backed by either a proof or an example.
- Problem 9
Verify the equality condition in Corollary 2.6, the Cauchy-Schwarz Inequality.
- Show that if is a negative scalar multiple of then and are less than or equal to zero.
- Show that if and only if one vector is a scalar multiple of the other.
- Problem 10
Suppose that and . Must ?
- This exercise is recommended for all readers.
- Problem 11
Does any vector have length zero except a zero vector? (If "yes", produce an example. If "no", prove it.)
- This exercise is recommended for all readers.
- Problem 12
Find the midpoint of the line segment connecting with in . Generalize to .
- Problem 13
Show that if then has length one. What if ?
- Problem 14
Show that if then is times as long as . What if ?
- This exercise is recommended for all readers.
- Problem 15
A vector of length one is a unit vector. Show that the dot product of two unit vectors has absolute value less than or equal to one. Can "less than" happen? Can "equal to"?
- Problem 16
Prove that
- Problem 17
Show that if for every then .
- Problem 18
Is ? If it is true then it would generalize the Triangle Inequality.
- Problem 19
What is the ratio between the sides in the Cauchy-Schwarz inequality?
- Problem 20
Why is the zero vector defined to be perpendicular to every vector?
- Problem 21
Describe the angle between two vectors in .
- Problem 22
Give a simple necessary and sufficient condition to determine whether the angle between two vectors is acute, right, or obtuse.
- This exercise is recommended for all readers.
- Problem 23
Generalize to the converse of the Pythagorean Theorem, that if and are perpendicular then .
- Problem 24
Show that if and only if and are perpendicular. Give an example in .
- Problem 25
Show that if a vector is perpendicular to each of two others then it is perpendicular to each vector in the plane they generate. (Remark. They could generate a degenerate plane— a line or a point— but the statement remains true.)
- Problem 26
Prove that, where are nonzero vectors, the vector
bisects the angle between them. Illustrate in .
- Problem 27
Verify that the definition of angle is dimensionally correct: (1) if then the cosine of the angle between and equals the cosine of the angle between and , and (2) if then the cosine of the angle between and is the negative of the cosine of the angle between and .
- This exercise is recommended for all readers.
- Problem 28
Show that the inner product operation is linear: for and , .
- This exercise is recommended for all readers.
- Problem 29
The geometric mean of two positive reals is . It is analogous to the arithmetic mean . Use the Cauchy-Schwarz inequality to show that the geometric mean of any is less than or equal to the arithmetic mean.
- ? Problem 30
A ship is sailing with speed and direction ; the wind blows apparently (judging by the vane on the mast) in the direction of a vector ; on changing the direction and speed of the ship from to the apparent wind is in the direction of a vector .
Find the vector velocity of the wind (Ivanoff & Esty 1933) .
- Problem 31
Verify the Cauchy-Schwarz inequality by first proving Lagrange's identity:
and then noting that the final term is positive. (Recall the meaning
and
of the notation.) This result is an improvement over Cauchy-Schwarz because it gives a formula for the difference between the two sides. Interpret that difference in .
Section III - Reduced Echelon Form
After developing the mechanics of Gauss' method, we observed that it can be done in more than one way. One example is that we sometimes have to swap rows and there can be more than one row to choose from. Another example is that from this matrix
Gauss' method could derive any of these echelon form matrices.
The first results from . The second comes from following with . The third comes from followed by (after the first pivot the matrix is already in echelon form so the second one is extra work but it is nonetheless a legal row operation).
The fact that the echelon form outcome of Gauss' method is not unique leaves us with some questions. Will any two echelon form versions of a system have the same number of free variables? Will they in fact have exactly the same variables free? In this section we will answer both questions "yes". We will do more than answer the questions. We will give a way to decide if one linear system can be derived from another by row operations. The answers to the two questions will follow from this larger result.
1 - Gauss-Jordan Reduction
Gaussian elimination coupled with back-substitution solves linear systems, but it's not the only method possible. Here is an extension of Gauss' method that has some advantages.
- Example 1.1
To solve
we can start by going to echelon form as usual.
We can keep going to a second stage by making the leading entries into ones
and then to a third stage that uses the leading entries to eliminate all of the other entries in each column by pivoting upwards.
The answer is , , and .
Note that the pivot operations in the first stage proceed from column one to column three while the pivot operations in the third stage proceed from column three to column one.
- Example 1.2
We often combine the operations of the middle stage into a single step, even though they are operations on different rows.
The answer is and .
This extension of Gauss' method is Gauss-Jordan reduction. It goes past echelon form to a more refined, more specialized, matrix form.
- Definition 1.3
A matrix is in reduced echelon form if, in addition to being in echelon form, each leading entry is a one and is the only nonzero entry in its column.
The disadvantage of using Gauss-Jordan reduction to solve a system is that the additional row operations mean additional arithmetic. The advantage is that the solution set can just be read off.
In any echelon form, plain or reduced, we can read off when a system has an empty solution set because there is a contradictory equation, we can read off when a system has a one-element solution set because there is no contradiction and every variable is the leading variable in some row, and we can read off when a system has an infinite solution set because there is no contradiction and at least one variable is free.
In reduced echelon form we can read off not just what kind of solution set the system has, but also its description. Whether or not the echelon form is reduced, we have no trouble describing the solution set when it is empty, of course. The two examples above show that when the system has a single solution then the solution can be read off from the right-hand column. In the case when the solution set is infinite, its parametrization can also be read off of the reduced echelon form. Consider, for example, this system that is shown brought to echelon form and then to reduced echelon form.
Starting with the middle matrix, the echelon form version, back substitution produces so that , then another back substitution gives implying that , and then the final back substitution gives implying that . Thus the solution set is this.
Now, considering the final matrix, the reduced echelon form version, note that adjusting the parametrization by moving the terms to the other side does indeed give the description of this infinite solution set.
Part of the reason that this works is straightforward. While a set can have many parametrizations that describe it, e.g., both of these also describe the above set (take to be and to be )
nonetheless we have in this book stuck to a convention of parametrizing using the unmodified free variables (that is, instead of ). We can easily see that a reduced echelon form version of a system is equivalent to a parametrization in terms of unmodified free variables. For instance,
(to move from left to right we also need to know how many equations are in the system). So, the convention of parametrizing with the free variables by solving each equation for its leading variable and then eliminating that leading variable from every other equation is exactly equivalent to the reduced echelon form conditions that each leading entry must be a one and must be the only nonzero entry in its column.
Not as straightforward is the other part of the reason that the reduced echelon form version allows us to read off the parametrization that we would have gotten had we stopped at echelon form and then done back substitution. The prior paragraph shows that reduced echelon form corresponds to some parametrization, but why the same parametrization? A solution set can be parametrized in many ways, and Gauss' method or the Gauss-Jordan method can be done in many ways, so a first guess might be that we could derive many different reduced echelon form versions of the same starting system and many different parametrizations. But we never do. Experience shows that starting with the same system and proceeding with row operations in many different ways always yields the same reduced echelon form and the same parametrization (using the unmodified free variables).
In the rest of this section we will show that the reduced echelon form version of a matrix is unique. It follows that the parametrization of a linear system in terms of its unmodified free variables is unique because two different ones would give two different reduced echelon forms.
We shall use this result, and the ones that lead up to it, in the rest of the book but perhaps a restatement in a way that makes it seem more immediately useful may be encouraging. Imagine that we solve a linear system, parametrize, and check in the back of the book for the answer. But the parametrization there appears different. Have we made a mistake, or could these be different-looking descriptions of the same set, as with the three descriptions above of ? The prior paragraph notes that we will show here that different-looking parametrizations (using the unmodified free variables) describe genuinely different sets.
Here is an informal argument that the reduced echelon form version of a matrix is unique. Consider again the example that started this section of a matrix that reduces to three different echelon form matrices. The first matrix of the three is the natural echelon form version. The second matrix is the same as the first except that a row has been halved. The third matrix, too, is just a cosmetic variant of the first. The definition of reduced echelon form outlaws this kind of fooling around. In reduced echelon form, halving a row is not possible because that would change the row's leading entry away from one, and neither is combining rows possible, because then a leading entry would no longer be alone in its column.
This informal justification is not a proof; we have argued that no two different reduced echelon form matrices are related by a single row operation step, but we have not ruled out the possibility that multiple steps might do. Before we go to that proof, we finish this subsection by rephrasing our work in a terminology that will be enlightening.
Many different matrices yield the same reduced echelon form matrix. The three echelon form matrices from the start of this section, and the matrix they were derived from, all give this reduced echelon form matrix.
We think of these matrices as related to each other. The next result speaks to this relationship.
- Lemma 1.4
Elementary row operations are reversible.
- Proof
For any matrix , the effect of swapping rows is reversed by swapping them back, multiplying a row by a nonzero is undone by multiplying by , and adding a multiple of row to row (with ) is undone by subtracting the same multiple of row from row .
(The conditions is needed. See Problem 7.)
This lemma suggests that "reduces to" is misleading— where , we shouldn't think of as "after" or "simpler than" . Instead we should think of them as interreducible or interrelated. Below is a picture of the idea. The matrices from the start of this section and their reduced echelon form version are shown in a cluster. They are all interreducible; these relationships are shown also.
We say that matrices that reduce to each other are "equivalent with respect to the relationship of row reducibility". The next result verifies this statement using the definition of an equivalence.[1]
- Lemma 1.5
Between matrices, "reduces to" is an equivalence relation.
- Proof
We must check the conditions (i) reflexivity, that any matrix reduces to itself, (ii) symmetry, that if reduces to then reduces to , and (iii) transitivity, that if reduces to and reduces to then reduces to .
Reflexivity is easy; any matrix reduces to itself in zero row operations.
That the relationship is symmetric is Lemma 1.4— if reduces to by some row operations then also reduces to by reversing those operations.
For transitivity, suppose that reduces to and that reduces to . Linking the reduction steps from with those from gives a reduction from to .
- Definition 1.6
Two matrices that are interreducible by the elementary row operations are row equivalent.
The diagram below shows the collection of all matrices as a box. Inside that box, each matrix lies in some class. Matrices are in the same class if and only if they are interreducible. The classes are disjoint— no matrix is in two distinct classes. The collection of matrices has been partitioned into row equivalence classes.[2]
One of the classes in this partition is the cluster of matrices shown above, expanded to include all of the nonsingular matrices.
The next subsection proves that the reduced echelon form of a matrix is unique; that every matrix reduces to one and only one reduced echelon form matrix. Rephrased in terms of the row-equivalence relationship, we shall prove that every matrix is row equivalent to one and only one reduced echelon form matrix. In terms of the partition what we shall prove is: every equivalence class contains one and only one reduced echelon form matrix. So each reduced echelon form matrix serves as a representative of its class.
After that proof we shall, as mentioned in the introduction to this section, have a way to decide if one matrix can be derived from another by row reduction. We just apply the Gauss-Jordan procedure to both and see whether or not they come to the same reduced echelon form.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Use Gauss-Jordan reduction to solve each system.
- This exercise is recommended for all readers.
- Problem 2
Find the reduced echelon form of each matrix.
- This exercise is recommended for all readers.
- Problem 3
Find each solution set by using Gauss-Jordan reduction, then reading off the parametrization.
- Problem 4
Give two distinct echelon form versions of this matrix.
- This exercise is recommended for all readers.
- Problem 5
List the reduced echelon forms possible for each size.
- This exercise is recommended for all readers.
- Problem 6
What results from applying Gauss-Jordan reduction to a nonsingular matrix?
- Problem 7
The proof of Lemma 1.4 contains a reference to the condition on the row pivoting operation.
- The definition of row operations has an condition on the swap operation . Show that in this condition is not needed.
- Write down a matrix with nonzero entries, and show that the operation is not reversed by .
- Expand the proof of that lemma to make explicit exactly where the condition on pivoting is used.
Footnotes
- ↑ More information on equivalence relations is in the appendix.
- ↑ More information on partitions and class representatives is in the appendix.
2 - Row Equivalence
We will close this section and this chapter by proving that every matrix is row equivalent to one and only one reduced echelon form matrix. The ideas that appear here will reappear, and be further developed, in the next chapter.
The underlying theme here is that one way to understand a mathematical situation is by being able to classify the cases that can happen. We have met this theme several times already. We have classified solution sets of linear systems into the no-elements, one-element, and infinitely-many elements cases. We have also classified linear systems with the same number of equations as unknowns into the nonsingular and singular cases. We adopted these classifications because they give us a way to understand the situations that we were investigating. Here, where we are investigating row equivalence, we know that the set of all matrices breaks into the row equivalence classes. When we finish the proof here, we will have a way to understand each of those classes— its matrices can be thought of as derived by row operations from the unique reduced echelon form matrix in that class.
To understand how row operations act to transform one matrix into another, we consider the effect that they have on the parts of a matrix. The crucial observation is that row operations combine the rows linearly.
- Definition 2.1
A linear combination of is an expression of the form where the 's are scalars.
(We have already used the phrase "linear combination" in this book. The meaning is unchanged, but the next result's statement makes a more formal definition in order.)
- Lemma 2.2 (Linear Combination Lemma)
A linear combination of linear combinations is a linear combination.
- Proof
Given the linear combinations through , consider a combination of those
where the 's are scalars along with the 's. Distributing those 's and regrouping gives
which is a linear combination of the 's.
In this subsection we will use the convention that, where a matrix is named with an upper case roman letter, the matching lower-case greek letter names the rows.
- Corollary 2.3
Where one matrix reduces to another, each row of the second is a linear combination of the rows of the first.
The proof below uses induction on the number of row operations used to reduce one matrix to the other. Before we proceed, here is an outline of the argument (readers unfamiliar with induction may want to compare this argument with the one used in the "" proof).[1] First, for the base step of the argument, we will verify that the proposition is true when reduction can be done in zero row operations. Second, for the inductive step, we will argue that if being able to reduce the first matrix to the second in some number of operations implies that each row of the second is a linear combination of the rows of the first, then being able to reduce the first to the second in operations implies the same thing. Together, this base step and induction step prove this result because by the base step the proposition is true in the zero operations case, and by the inductive step the fact that it is true in the zero operations case implies that it is true in the one operation case, and the inductive step applied again gives that it is therefore true in the two operations case, etc.
- Proof
We proceed by induction on the minimum number of row operations that take a first matrix to a second one .
In the base step, that zero reduction operations suffice, the two matrices are equal and each row of is obviously a combination of 's rows: .
For the inductive step, assume the inductive hypothesis: with , if a matrix can be derived from in or fewer operations then its rows are linear combinations of the 's rows. Consider a that takes operations. Because there are more than zero operations, there must be a next-to-last matrix so that . This is only operations away from and so the inductive hypothesis applies to it, that is, each row of is a linear combination of the rows of .
If the last operation, the one from to , is a row swap then the rows of are just the rows of reordered and thus each row of is also a linear combination of the rows of . The other two possibilities for this last operation, that it multiplies a row by a scalar and that it adds a multiple of one row to another, both result in the rows of being linear combinations of the rows of . But therefore, by the Linear Combination Lemma, each row of is a linear combination of the rows of .
With that, we have both the base step and the inductive step, and so the proposition follows.
- Example 2.4
In the reduction
call the matrices , , , and . The methods of the proof show that there are three sets of linear relationships.
The prior result gives us the insight that Gauss' method works by taking linear combinations of the rows. But to what end; why do we go to echelon form as a particularly simple, or basic, version of a linear system? The answer, of course, is that echelon form is suitable for back substitution, because we have isolated the variables. For instance, in this matrix
has been removed from 's equation. That is, Gauss' method has made 's row independent of 's row.
Independence of a collection of row vectors, or of any kind of vectors, will be precisely defined and explored in the next chapter. But a first take on it is that we can show that, say, the third row above is not comprised of the other rows, that . For, suppose that there are scalars , , and such that this relationship holds.
The first row's leading entry is in the first column and narrowing our consideration of the above relationship to consideration only of the entries from the first column gives that . The second row's leading entry is in the third column and the equation of entries in that column , along with the knowledge that , gives that . Now, to finish, the third row's leading entry is in the fourth column and the equation of entries in that column , along with and , gives an impossibility.
The following result shows that this effect always holds. It shows that what Gauss' linear elimination method eliminates is linear relationships among the rows.
- Lemma 2.5
In an echelon form matrix, no nonzero row is a linear combination of the other rows.
- Proof
Let be in echelon form. Suppose, to obtain a contradiction, that some nonzero row is a linear combination of the others.
We will first use induction to show that the coefficients , ..., associated with rows above are all zero. The contradiction will come from consideration of and the rows below it.
The base step of the induction argument is to show that the first coefficient is zero. Let the first row's leading entry be in column number and consider the equation of entries in that column.
The matrix is in echelon form so the entries , ..., , including , are all zero.
Because the entry is nonzero as it leads its row, the coefficient must be zero.
The inductive step is to show that for each row index between and , if the coefficient and the coefficients , ..., are all zero then is also zero. That argument, and the contradiction that finishes this proof, is saved for Problem 11.
We can now prove that each matrix is row equivalent to one and only one reduced echelon form matrix. We will find it convenient to break the first half of the argument off as a preliminary lemma. For one thing, it holds for any echelon form whatever, not just reduced echelon form.
- Lemma 2.6
If two echelon form matrices are row equivalent then the leading entries in their first rows lie in the same column. The same is true of all the nonzero rows— the leading entries in their second rows lie in the same column, etc.
For the proof we rephrase the result in more technical terms. Define the form of an matrix to be the sequence where is the column number of the leading entry in row and if there is no leading entry in that row. The lemma says that if two echelon form matrices are row equivalent then their forms are equal sequences.
- Proof
Let and be echelon form matrices that are row equivalent. Because they are row equivalent they must be the same size, say . Let the column number of the leading entry in row of be and let the column number of the leading entry in row of be . We will show that , that , etc., by induction.
This induction argument relies on the fact that the matrices are row equivalent, because the Linear Combination Lemma and its corollary therefore give that each row of is a linear combination of the rows of and vice versa:
where the 's and 's are scalars.
The base step of the induction is to verify the lemma for the first rows of the matrices, that is, to verify that . If either row is a zero row then the entire matrix is a zero matrix since it is in echelon form, and therefore both matrices are zero matrices (by Corollary 2.3), and so both and are . For the case where neither nor is a zero row, consider the instance of the linear relationship above.
First, note that is impossible: in the columns of to the left of column the entries are all zeroes (as leads the first row) and so if then the equation of entries from column would be , but isn't zero since it leads its row and so this is an impossibility. Next, a symmetric argument shows that also is impossible. Thus the base case holds.
The inductive step is to show that if , and , ..., and , then also (for in the interval ). This argument is saved for Problem 12.
That lemma answers two of the questions that we have posed: (i) any two echelon form versions of a matrix have the same free variables, and consequently, and (ii) any two echelon form versions have the same number of free variables. There is no linear system and no combination of row operations such that, say, we could solve the system one way and get and free but solve it another way and get and free, or solve it one way and get two free variables while solving it another way yields three.
We finish now by specializing to the case of reduced echelon form matrices.
- Theorem 2.7
Each matrix is row equivalent to a unique reduced echelon form matrix.
- Proof
Clearly any matrix is row equivalent to at least one reduced echelon form matrix, via Gauss-Jordan reduction. For the other half, that any matrix is equivalent to at most one reduced echelon form matrix, we will show that if a matrix Gauss-Jordan reduces to each of two others then those two are equal.
Suppose that a matrix is row equivalent to two reduced echelon form matrices and , which are therefore row equivalent to each other. The Linear Combination Lemma and its corollary allow us to write the rows of one, say , as a linear combination of the rows of the other . The preliminary result, Lemma 2.6, says that in the two matrices, the same collection of rows are nonzero. Thus, if through are the nonzero rows of then the nonzero rows of are through . Zero rows don't contribute to the sum so we can rewrite the relationship to include just the nonzero rows.
The preliminary result also says that for each row between and , the leading entries of the -th row of and appear in the same column, denoted . Rewriting the above relationship to focus on the entries in the -th column
gives this set of equations for up to .
Since is in reduced echelon form, all of the 's in column are zero except for , which is . Thus each equation above simplifies to . But is also in reduced echelon form and so all of the 's in column are zero except for , which is . Therefore, each is zero, except that , and , ..., and .
We have shown that the only nonzero coefficient in the linear combination labelled () is , which is . Therefore . Because this holds for all nonzero rows, .
We end with a recap. In Gauss' method we start with a matrix and then derive a sequence of other matrices. We defined two matrices to be related if one can be derived from the other. That relation is an equivalence relation, called row equivalence, and so partitions the set of all matrices into row equivalence classes.
(There are infinitely many matrices in the pictured class, but we've only got room to show two.) We have proved there is one and only one reduced echelon form matrix in each row equivalence class. So the reduced echelon form is a canonical form[2] for row equivalence: the reduced echelon form matrices are representatives of the classes.
We can answer questions about the classes by translating them into questions about the representatives.
- Example 2.8
We can decide if matrices are interreducible by seeing if Gauss-Jordan reduction produces the same reduced echelon form result. Thus, these are not row equivalent
because their reduced echelon forms are not equal.
- Example 2.9
Any nonsingular matrix Gauss-Jordan reduces to this.
- Example 2.10
We can describe the classes by listing all possible reduced echelon form matrices. Any matrix lies in one of these: the class of matrices row equivalent to this,
the infinitely many classes of matrices row equivalent to one of this type
where (including ), the class of matrices row equivalent to this,
and the class of matrices row equivalent to this
(this is the class of nonsingular matrices).
Exercises
- This exercise is recommended for all readers.
- Problem 1
Decide if the matrices are row equivalent.
- Problem 2
Describe the matrices in each of the classes represented in Example 2.10.
- Problem 3
Describe all matrices in the row equivalence class of these.
- Problem 4
How many row equivalence classes are there?
- Problem 5
Can row equivalence classes contain different-sized matrices?
- Problem 6
How big are the row equivalence classes?
- Show that the class of any zero matrix is finite.
- Do any other classes contain only finitely many members?
- This exercise is recommended for all readers.
- Problem 7
Give two reduced echelon form matrices that have their leading entries in the same columns, but that are not row equivalent.
- This exercise is recommended for all readers.
- Problem 8
Show that any two nonsingular matrices are row equivalent. Are any two singular matrices row equivalent?
- This exercise is recommended for all readers.
- Problem 9
Describe all of the row equivalence classes containing these.
- matrices
- matrices
- matrices
- matrices
- Problem 10
- Show that a vector is a linear combination of members of the set if and only if there is a linear relationship where is not zero. (Hint. Watch out for the case.)
- Use that to simplify the proof of Lemma 2.5.
- This exercise is recommended for all readers.
- Problem 11
Finish the proof of Lemma 2.5.
- First illustrate the inductive step by showing that .
- Do the full inductive step: where , assume that for and deduce that also.
- Find the contradiction.
- Problem 12
Finish the induction argument in Lemma 2.6.
- State the inductive hypothesis, Also state what must be shown to follow from that hypothesis.
- Check that the inductive hypothesis implies that in the relationship the coefficients are each zero.
- Finish the inductive step by arguing, as in the base case, that and are impossible.
- Problem 13
Why, in the proof of Theorem 2.7, do we bother to restrict to the nonzero rows? Why not just stick to the relationship that we began with, , with instead of , and argue using it that the only nonzero coefficient is , which is ?
- This exercise is recommended for all readers.
- Problem 14
Three truck drivers went into a roadside cafe. One truck driver purchased four sandwiches, a cup of coffee, and ten doughnuts for $. Another driver purchased three sandwiches, a cup of coffee, and seven doughnuts for $. What did the third truck driver pay for a sandwich, a cup of coffee, and a doughnut? (Trono 1991)
- Problem 15
The fact that Gaussian reduction disallows multiplication of a row by zero is needed for the proof of uniqueness of reduced echelon form, or else every matrix would be row equivalent to a matrix of all zeros. Where is it used?
- This exercise is recommended for all readers.
- Problem 16
The Linear Combination Lemma says which equations can be gotten from Gaussian reduction from a given linear system.
- Produce an equation not implied by this system.
- Can any equation be derived from an inconsistent system?
- Problem 17
Extend the definition of row equivalence to linear systems. Under your definition, do equivalent systems have the same solution set? (Hoffman & Kunze 1971)
- This exercise is recommended for all readers.
- Problem 18
In this matrix
the first and second columns add to the third.
- Show that remains true under any row operation.
- Make a conjecture.
- Prove that it holds.
Footnotes
- ↑ More information on mathematical induction is in the appendix.
- ↑ More information on canonical representatives is in the appendix.
Topic: Computer Algebra Systems
The linear systems in this chapter are small enough that their solution by hand is easy. But large systems are easiest, and safest, to do on a computer. There are special purpose programs such as LINPACK for this job. Another popular tool is a general purpose computer algebra system, including both commercial packages such as Maple, Mathematica, or MATLAB, or free packages such as SciLab, Sage, or Octave.
For example, in the Topic on Networks, we need to solve this.
It can be done by hand, but it would take a while and be error-prone. Using a computer is better.
We illustrate by solving that system under Maple (for another system, a user's manual would obviously detail the exact syntax needed). The array of coefficients can be entered in this way
> A:=array( [[1,-1,-1,0,0,0,0], [0,1,0,-1,0,-1,0], [0,0,1,0,-1,1,0], [0,0,0,1,1,0,-1], [0,5,0,10,0,0,0], [0,0,2,0,4,0,0], [0,5,-2,0,0,50,0]] );
(putting the rows on separate lines is not necessary,
but is done for clarity).
The vector of constants is entered similarly.
> u:=array( [0,0,0,0,10,10,0] );
Then the system is solved, like magic.
> linsolve(A,u); 7 2 5 2 5 7 [ -, -, -, -, -, 0, - ] 3 3 3 3 3 3
Mathematica can solve this with
RowReduce[({{1, -1, -1, 0, 0, 0, 0, 0}, {0, 1, 0, -1, 0, -1, 0,
0}, {0, 0, 1, 0, -1, 1, 0, 0}, {0, 0, 0, 1, 1, 0, -1, 0}, {0, 5,
0, 10, 0, 0, 0, 10}, {0, 0, 2, 0, 4, 0, 0, 10}, {0, 5, -2, 0, 0,
50, 0, 0}})]
This returns the following output:
{{1, 0, 0, 0, 0, 0, 0, 7/3}, {0, 1, 0, 0, 0, 0, 0, 2/3}, {0, 0, 1, 0,
0, 0, 0, 5/3}, {0, 0, 0, 1, 0, 0, 0, 2/3}, {0, 0, 0, 0, 1, 0, 0, 5/
3}, {0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 7/3}}
Systems with infinitely many solutions are solved in the same
way— the computer simply returns a parametrization.
Exercises
Answers for this Topic use Maple as the computer algebra system. In particular, all of these were tested on Maple V running under MS-DOS NT version 4.0. (On all of them, the preliminary command to load the linear algebra package along with Maple's responses to the Enter key, have been omitted.) Other systems have similar commands.
- Problem 1
Use the computer to solve the two problems that opened this chapter.
- This is the Statics problem.
- This is the Chemistry problem.
- Problem 2
Use the computer to solve these systems from the first subsection, or conclude "many solutions" or "no solutions".
- Problem 3
Use the computer to solve these systems from the second subsection.
- Problem 4
What does the computer give for the solution of the general system?
Topic: Input-Output Analysis
An economy is an immensely complicated network of interdependences. Changes in one part can ripple out to affect other parts. Economists have struggled to be able to describe, and to make predictions about, such a complicated object. Mathematical models using systems of linear equations have emerged as a key tool. One is Input-Output Analysis, pioneered by W. Leontief, who won the 1973 Nobel Prize in Economics.
Consider an economy with many parts, two of which are the steel industry and the auto industry. As they work to meet the demand for their product from other parts of the economy, that is, from users external to the steel and auto sectors, these two interact tightly. For instance, should the external demand for autos go up, that would lead to an increase in the auto industry's usage of steel. Or, should the external demand for steel fall, then it would lead to a fall in steel's purchase of autos. The type of Input-Output model we will consider takes in the external demands and then predicts how the two interact to meet those demands.
We start with a listing of production and consumption statistics. (These numbers, giving dollar values in millions, are excerpted from (Leontief 1965) , describing the 1958 U.S. economy. Today's statistics would be quite different, both because of inflation and because of technical changes in the industries.)
used by steel |
used by auto |
used by others |
total | |
value of steel |
5 395 | 2 664 | 25 448 | |
value of auto |
48 | 9 030 | 30 346 |
For instance, the dollar value of steel used by the auto industry in this year is million. Note that industries may consume some of their own output.
We can fill in the blanks for the external demand. This year's value of the steel used by others this year is and this year's value of the auto used by others is . With that, we have a complete description of the external demands and of how auto and steel interact, this year, to meet them.
Now, imagine that the external demand for steel has recently been going up by per year and so we estimate that next year it will be . Imagine also that for similar reasons we estimate that next year's external demand for autos will be down to . We wish to predict next year's total outputs.
That prediction isn't as simple as adding to this year's steel total and subtracting from this year's auto total. For one thing, a rise in steel will cause that industry to have an increased demand for autos, which will mitigate, to some extent, the loss in external demand for autos. On the other hand, the drop in external demand for autos will cause the auto industry to use less steel, and so lessen somewhat the upswing in steel's business. In short, these two industries form a system, and we need to predict the totals at which the system as a whole will settle.
For that prediction, let be next years total production of steel and let be next year's total output of autos. We form these equations.
On the left side of those equations go the unknowns and .
At the ends of the right sides go our external demand estimates for next
year and .
For the remaining four terms, we look to the table of this year's information
about how the industries interact.
For instance, for next year's use of steel by steel, we note that this year the steel industry used units of steel input to produce units of steel output. So next year, when the steel industry will produce units out, we expect that doing so will take units of steel input— this is simply the assumption that input is proportional to output. (We are assuming that the ratio of input to output remains constant over time; in practice, models may try to take account of trends of change in the ratios.)
Next year's use of steel by the auto industry is similar. This year, the auto industry uses units of steel input to produce units of auto output. So next year, when the auto industry's total output is , we expect it to consume units of steel.
Filling in the other equation in the same way, we get this system of linear equation.
Gauss' method on this system.
gives and .
Looking back, recall that above we described why the prediction of next year's totals isn't as simple as adding to last year's steel total and subtracting from last year's auto total. In fact, comparing these totals for next year to the ones given at the start for the current year shows that, despite the drop in external demand, the total production of the auto industry is predicted to rise. The increase in internal demand for autos caused by steel's sharp rise in business more than makes up for the loss in external demand for autos.
One of the advantages of having a mathematical model is that we can ask "What if ...?" questions. For instance, we can ask "What if the estimates for next year's external demands are somewhat off?" To try to understand how much the model's predictions change in reaction to changes in our estimates, we can try revising our estimate of next year's external steel demand from down to , while keeping the assumption of next year's external demand for autos fixed at . The resulting system
when solved gives and .
This kind of exploration of the model is sensitivity analysis.
We are seeing how sensitive the predictions of our model are to the
accuracy of the assumptions.
Obviously, we can consider larger models that detail the interactions among more sectors of an economy. These models are typically solved on a computer, using the techniques of matrix algebra that we will develop in Chapter Three. Some examples are given in the exercises. Obviously also, a single model does not suit every case; expert judgment is needed to see if the assumptions underlying the model are reasonable for a particular case. With those caveats, however, this model has proven in practice to be a useful and accurate tool for economic analysis. For further reading, try (Leontief 1951) and (Leontief 1965) .
Exercises
Hint: these systems are easiest to solve on a computer.
- Problem 1
With the steel-auto system given above, estimate next year's total productions in these cases.
- Next year's external demands are: up from this year for steel, and unchanged for autos.
- Next year's external demands are: up for steel, and up for autos.
- Next year's external demands are: up for steel, and up for autos.
- Problem 2
In the steel-auto system, the ratio for the use of steel by the auto industry is , about . Imagine that a new process for making autos reduces this ratio to .
- How will the predictions for next year's total productions change compared to the first example discussed above (i.e., taking next year's external demands to be for steel and for autos)?
- Predict next year's totals if, in addition, the external demand for autos rises to be because the new cars are cheaper.
- Problem 3
This table gives the numbers for the auto-steel system from a different year, 1947 (see Leontief 1951 ). The units here are billions of 1947 dollars.
used by steel | used by auto | used by others | total | |
value of steel | 6.90 | 1.28 | 18.69 | |
value of auto | 0 | 4.40 | 14.27 |
- Solve for total output if next year's external demands are: steel's demand up 10% and auto's demand up 15%.
- How do the ratios compare to those given above in the discussion for the 1958 economy?
- Solve the 1947 equations with the 1958 external demands (note the difference in units; a 1947 dollar buys about what $1.30 in 1958 dollars buys). How far off are the predictions for total output?
- Problem 4
Predict next year's total productions of each of the three sectors of the hypothetical economy shown below
used by farm | used by rail | used by shipping | used by others | total | |
value of farm | 25 | 50 | 100 | 500 | |
value of rail | 25 | 50 | 50 | 300 | |
value of shipping | 15 | 10 | 0 | 500 |
if next year's external demands are as stated.
- for farm, for rail, for shipping
- for farm, for rail, for shipping
- Problem 5
This table gives the interrelationships among three segments of an economy (see Clark & Coupe 1967 ).
used by food | used by wholesale | used by retail | used by others | total | |
value of food | 0 | 2 318 | 4 679 | 11 869 | |
value of wholesale | 393 | 1 089 | 22 459 | 122 242 | |
value of retail | 3 | 53 | 75 | 116 041 |
We will do an Input-Output analysis on this system.
- Fill in the numbers for this year's external demands.
- Set up the linear system, leaving next year's external demands blank.
- Solve the system where next year's external demands are calculated by taking this year's external demands and inflating them 10%. Do all three sectors increase their total business by 10%? Do they all even increase at the same rate?
- Solve the system where next year's external demands are calculated by taking this year's external demands and reducing them 7%. (The study from which these numbers are taken concluded that because of the closing of a local military facility, overall personal income in the area would fall 7%, so this might be a first guess at what would actually happen.)
Input-Output Analysis M File
# Octave commands for _Linear Algebra_ by Jim Hefferon, # Topic: leontif.tex a=[(25448-5395)/25448 -2664/30346; -48/25448 (30346-9030)/30346]; b=[17589; 21243]; ans=a \ b; printf("The answer to the first system is s=%0.0f and a=%0.0f\n",ans(1),ans(2)); b=[17489; 21243]; ans=a \ b; printf("The answer to the second system is s=%0.0f and a=%0.0f\n",ans(1),ans(2)); # question 1 b=[17789; 21243]; ans=a \ b; printf("The answer to question (1a) is s=%0.0f and a=%0.0f\n",ans(1),ans(2)); b=[17689; 21443]; ans=a \ b; printf("The answer to question (1b) is s=%0.0f and a=%0.0f\n",ans(1),ans(2)); b=[17789; 21443]; ans=a \ b; printf("The answer to question (1c) is s=%0.0f and a=%0.0f\n",ans(1),ans(2)); # question 2 printf("Current ratio for use of steel by auto is %0.4f\n",2664/30346); a=[(25448-5395)/25448 -0.0500; -48/25448 (30346-9030)/30346]; b=[17589; 21243]; ans=a \ b; printf("The answer to 2(a) is s=%0.0f and a=%0.0f\n",ans(1),ans(2)); b=[17589; 21500]; ans=a \ b; printf("The answer to 2(b) is s=%0.0f and a=%0.0f\n",ans(1),ans(2)); # question 3 printf("The value of steel used by others is %0.2f\n",18.69-(6.90+1.28)); printf("The value of autos used by others is %0.2f\n",14.27-(0+4.40)); a=[(18.69-6.90)/18.69 -1.28/14.27; -0/18.69 (14.27-4.40)/14.27]; b=[1.10*(18.69-(6.90+1.28)); 1.15*(14.27-(0+4.40))]; ans=a \ b; printf("The answer to 3(a) is s=%0.2f and a=%0.2f\n",ans(1),ans(2)); printf("The 1947 ratio of steel used by steel is %0.2f\n",(18.69-6.90)/18.69); printf("The 1947 ratio of steel used by autos is %0.2f\n",1.28/14.27); printf("The 1947 ratio of autos used by steel is %0.2f\n",0/18.69); printf("The 1947 ratio of autos used by autos is %0.2f\n",(14.27-4.40)/14.27); printf("The 1958 ratio of steel used by steel is %0.2f\n",(25448-5395)/25448); printf("The 1958 ratio of steel used by autos is %0.2f\n",2664/30346); printf("The 1958 ratio of autos used by steel is %0.2f\n",48/25448); printf("The 1958 ratio of autos used by autos is %0.2f\n",(30346-9030)/30346); b=[17.598/1.30; 21.243/1.30]; ans=a \ b; newans=1.30 * ans; printf("The answer to 3(c) is (in billions of 1947 dollars) s=%0.2f and a=%0.2f\n and in billions of 1958 dollars it is s=%0.2f and a=%0.2f\n",ans(1),ans(2),newans(1),newans(2));
Topic: Accuracy of Computations
Gauss' method lends itself nicely to computerization. The code below illustrates. It operates on an matrix a, pivoting with the first row, then with the second row, etc.
for (pivot_row = 1; pivot_row <= n - 1; pivot_row++) {
for (row_below = pivot_row + 1; row_below <= n; row_below++) {
multiplier = a[row_below, pivot_row] / a[pivot_row, pivot_row];
for (col = pivot_row; col <= n; col++) {
a[row_below, col] -= multiplier * a[pivot_row, col];
}
}
}
(This code is in the C language. Here is a brief translation. The loop construct for (pivot_row = 1; pivot_row <= n - 1; pivot_row++) { ... } sets pivot_row to 1 and then iterates while pivot_row is less than or equal to , each time through incrementing pivot_row by one with the "++" operation. The other non-obvious construct is that the "-=" in the innermost loop amounts to the a[row_below, col] =- multiplier * a[pivot_row, col] + a[row_below, col]} operation.)
While this code provides a quick take on how Gauss' method can be mechanized, it is not ready to use. It is naive in many ways. The most glaring way is that it assumes that a nonzero number is always found in the pivot_row, pivot_row position for use as the pivot entry. To make it practical, one way in which this code needs to be reworked is to cover the case where finding a zero in that location leads to a row swap, or to the conclusion that the matrix is singular.
Adding some if statements to cover those cases is not hard, but we will instead consider some more subtle ways in which the code is naive. There are pitfalls arising from the computer's reliance on finite-precision floating point arithmetic.
For example, we have seen above that we must handle as a separate case a system that is singular. But systems that are nearly singular also require care. Consider this one.
By eye we get the solution and . But a computer has more trouble. A computer that represents real numbers to eight significant places (as is common, usually called single precision) will represent the second equation internally as , losing the digits in the ninth place. Instead of reporting the correct solution, this computer will report something that is not even close— this computer thinks that the system is singular because the two equations are represented internally as equal.
For some intuition about how the computer could come up with something that far off, we can graph the system.
At the scale of this graph, the two lines cannot be resolved apart. This system is nearly singular in the sense that the two lines are nearly the same line. Near-singularity gives this system the property that a small change in the system can cause a large change in its solution; for instance, changing the to changes the intersection point from to . This system changes radically depending on a ninth digit, which explains why the eight-place computer has trouble. A problem that is very sensitive to inaccuracy or uncertainties in the input values is ill-conditioned.
The above example gives one way in which a system can be difficult to solve on a computer. It has the advantage that the picture of nearly-equal lines gives a memorable insight into one way that numerical difficulties can arise. Unfortunately this insight isn't very useful when we wish to solve some large system. We cannot, typically, hope to understand the geometry of an arbitrary large system. In addition, there are ways that a computer's results may be unreliable other than that the angle between some of the linear surfaces is quite small.
For an example, consider the system below, from (Hamming 1971) .
The second equation gives , so and thus both variables have values that are just less than . A computer using two digits represents the system internally in this way (we will do this example in two-digit floating point arithmetic, but a similar one with eight digits is easy to invent).
The computer's row reduction step produces a second equation , which the computer rounds to two places as . Then the computer decides from the second equation that and from the first equation that . This value is fairly good, but the is quite bad. Thus, another cause of unreliable output is a mixture of floating point arithmetic and a reliance on pivots that are small.
An experienced programmer may respond that we should go to double precision where sixteen significant digits are retained. This will indeed solve many problems. However, there are some difficulties with it as a general approach. For one thing, double precision takes longer than single precision (on a '486 chip, multiplication takes eleven ticks in single precision but fourteen in double precision (Microsoft 1993) ) and has twice the memory requirements. So attempting to do all calculations in double precision is just not practical.[citation needed] And besides, the above systems can obviously be tweaked to give the same trouble in the seventeenth digit, so double precision won't fix all problems. What we need is a strategy to minimize the numerical trouble arising from solving systems on a computer, and some guidance as to how far the reported solutions can be trusted.
Mathematicians have made a careful study of how to get the most reliable results. A basic improvement on the naive code above is to not simply take the entry in the pivot_row, pivot_row position for the pivot, but rather to look at all of the entries in the pivot_row column below the pivot_row row, and take the one that is most likely to give reliable results (e.g., take one that is not too small). This strategy is partial pivoting. For example, to solve the troublesome system () above, we start by looking at both equations for a best first pivot, and taking the in the second equation as more likely to give good results. Then, the pivot step of gives a first equation of , which the computer will represent as , leading to the conclusion that and, after back-substitution, , both of which are close to right. The code from above can be adapted to this purpose.
for (pivot_row = 1; pivot_row <= n - 1; pivot_row++) {
/* Find the largest pivot in this column (in row max). */
max = pivot_row;
for (row_below = pivot_row + 1; pivot_row <= n; row_below++) {
if (abs(a[row_below, pivot_row]) > abs(a[max, row_below]))
max = row_below;
}
/* Swap rows to move that pivot entry up. */
for (col = pivot_row; col <= n; col++) {
temp = a[pivot_row, col];
a[pivot_row, col] = a[max, col];
a[max, col] = temp;
}
/* Proceed as before. */
for (row_below = pivot_row + 1; row_below <= n; row_below++) {
multiplier = a[row_below, pivot_row] / a[pivot_row, pivot_row];
for (col = pivot_row; col <= n; col++) {
a[row_below, col] -= multiplier * a[pivot_row, col];
}
}
}
A full analysis of the best way to implement Gauss' method is outside the scope of the book (see (Wilkinson 1965) ), but the method recommended by most experts is a variation on the code above that first finds the best pivot among the candidates, and then scales it to a number that is less likely to give trouble. This is scaled partial pivoting.
In addition to returning a result that is likely to be reliable, most well-done code will return a number, called the condition number that describes the factor by which uncertainties in the input numbers could be magnified to become inaccuracies in the results returned (see (Rice 1993) ).
The lesson of this discussion is that just because Gauss' method always works in theory, and just because computer code correctly implements that method, and just because the answer appears on green-bar paper, doesn't mean that the answer is reliable. In practice, always use a package where experts have worked hard to counter what can go wrong.
Exercises
- Problem 1
Using two decimal places, add and .
- Problem 2
This intersect-the-lines problem contrasts with the example discussed above.
Illustrate that in this system some small change in the numbers will produce only a small change in the solution by changing the constant in the bottom equation to and solving. Compare it to the solution of the unchanged system.
- Problem 3
Solve this system by hand (Rice 1993) .
- Solve it accurately, by hand.
- Solve it by rounding at each step to four significant digits.
- Problem 4
Rounding inside the computer often has an effect on the result. Assume that your machine has eight significant digits.
- Show that the machine will compute as unequal to . Thus, computer arithmetic is not associative.
- Compare the computer's version of and . Is twice the first equation the same as the second?
- Problem 5
Ill-conditioning is not only dependent on the matrix of coefficients. This example (Hamming 1971) shows that it can arise from an interaction between the left and right sides of the system. Let be a small real.
- Solve the system by hand. Notice that the 's divide out only because there is an exact cancelation of the integer parts on the right side as well as on the left.
- Solve the system by hand, rounding to two decimal places, and with .
Topic: Analyzing Networks
The diagram below shows some of a car's electrical network. The battery is on the left, drawn as stacked line segments. The wires are drawn as lines, shown straight and with sharp right angles for neatness. Each light is a circle enclosing a loop.
The designer of such a network needs to answer questions like: How much electricity flows when both the hi-beam headlights and the brake lights are on? Below, we will use linear systems to analyze simpler versions of electrical networks.
For the analysis we need two facts about electricity and two facts about electrical networks.
The first fact about electricity is that a battery is like a pump: it provides a force impelling the electricity to flow through the circuits connecting the battery's ends, if there are any such circuits. We say that the battery provides a potential to flow. Of course, this network accomplishes its function when, as the electricity flows through a circuit, it goes through a light. For instance, when the driver steps on the brake then the switch makes contact and a circuit is formed on the left side of the diagram, and the electrical current flowing through that circuit will make the brake lights go on, warning drivers behind.
The second electrical fact is that in some kinds of network components the amount of flow is proportional to the force provided by the battery. That is, for each such component there is a number, its resistance, such that the potential is equal to the flow times the resistance. The units of measurement are: potential is described in volts, the rate of flow is in amperes, and resistance to the flow is in ohms. These units are defined so that .
Components with this property, that the voltage-amperage response curve is a line through the origin, are called resistors. (Light bulbs such as the ones shown above are not this kind of component, because their ohmage changes as they heat up.) For example, if a resistor measures ohms then wiring it to a volt battery results in a flow of amperes. Conversely, if we have electrical current of amperes through it then there must be a volt potential difference between its ends. This is the voltage drop across the resistor. One way to think of a electrical circuits like the one above is that the battery provides a voltage rise while the other components are voltage drops.
The two facts that we need about networks are Kirchhoff's Laws.
- Current Law. For any point in a network, the flow in equals the flow out.
- Voltage Law. Around any circuit the total drop equals the total rise.
In the above network there is only one voltage rise, at the battery, but some networks have more than one.
For a start we can consider the network below. It has a battery that provides the potential to flow and three resistors (resistors are drawn as zig-zags). When components are wired one after another, as here, they are said to be in series.
By Kirchhoff's Voltage Law, because the voltage rise is volts, the total voltage drop must also be volts. Since the resistance from start to finish is ohms (the resistance of the wires is negligible), we get that the current is amperes. Now, by Kirchhoff's Current Law, there are amperes through each resistor. (And therefore the voltage drops are: volts across the oh m resistor, volts across the ohm resistor, and volts across the ohm resistor.)
The prior network is so simple that we didn't use a linear system, but the next network is more complicated. In this one, the resistors are in parallel. This network is more like the car lighting diagram shown earlier.
We begin by labeling the branches, shown below. Let the current through the left branch of the parallel portion be and that through the right branch be , and also let the current through the battery be . (We are following Kirchoff's Current Law; for instance, all points in the right branch have the same current, which we call . Note that we don't need to know the actual direction of flow— if current flows in the direction opposite to our arrow then we will simply get a negative number in the solution.)
The Current Law, applied to the point in the upper right where the flow meets and , gives that . Applied to the lower right it gives . In the circuit that loops out of the top of the battery, down the left branch of the parallel portion, and back into the bottom of the battery, the voltage rise is while the voltage drop is , so the Voltage Law gives that . Similarly, the circuit from the battery to the right branch and back to the battery gives that . And, in the circuit that simply loops around in the left and right branches of the parallel portion (arbitrarily taken clockwise), there is a voltage rise of and a voltage drop of so the Voltage Law gives that .
The solution is , , and , all in amperes. (Incidentally, this illustrates that redundant equations do indeed arise in practice.)
Kirchhoff's laws can be used to establish the electrical properties of networks of great complexity. The next diagram shows five resistors, wired in a series-parallel way.
This network is a Wheatstone bridge (see Problem 4). To analyze it, we can place the arrows in this way.
Kirchoff's Current Law, applied to the top node, the left node, the right node, and the bottom node gives these.
Kirchhoff's Voltage Law, applied to the inside loop (the to to to loop), the outside loop, and the upper loop not involving the battery, gives these.
Those suffice to determine the solution , , , , , and .
Networks of other kinds, not just electrical ones, can also be analyzed in this way. For instance, networks of streets are given in the exercises.
Exercises
Many of the systems for these problems are mostly easily solved on a computer.
- Problem 1
Calculate the amperages in each part of each network.
- Problem 2
In the first network that we analyzed, with the three resistors in series, we just added to get that they acted together like a single resistor of ohms. We can do a similar thing for parallel circuits. In the second circuit analyzed,
the electric current through the battery is amperes. Thus, the parallel portion is equivalent to a single resistor of ohms.
- What is the equivalent resistance if we change the ohm resistor to ohms?
- What is the equivalent resistance if the two are each ohms?
- Find the formula for the equivalent resistance if the two resistors in parallel are ohms and ohms.
- Problem 3
For the car dashboard example that opens this Topic, solve for these amperages (assume that all resistances are ohms).
- If the driver is stepping on the brakes, so the brake lights are on, and no other circuit is closed.
- If the hi-beam headlights and the brake lights are on.
- Problem 4
Show that, in this Wheatstone Bridge,
equals if and only if the current flowing through is zero. (The way that this device is used in practice is that an unknown resistance at is compared to the other three , , and . At is placed a meter that shows the current. The three resistances , , and are varied— typically they each have a calibrated knob— until the current in the middle reads , and then the above equation gives the value of .)
There are networks other than electrical ones, and we can ask how well Kirchoff's laws apply to them. The remaining questions consider an extension to networks of streets.
- Problem 5
Consider this traffic circle.
This is the traffic volume, in units of cars per five minutes.
We can set up equations to model how the traffic flows.
- Adapt Kirchoff's Current Law to this circumstance. Is it a reasonable modelling assumption?
- Label the three between-road arcs in the circle with a variable. Using the (adapted) Current Law, for each of the three in-out intersections state an equation describing the traffic flow at that node.
- Solve that system.
- Interpret your solution.
- Restate the Voltage Law for this circumstance. How reasonable is it?
- Problem 6
This is a network of streets.
The hourly flow of cars into this network's entrances, and out of its exits can be observed.
(Note that to reach Jay a car must enter the network via some other road first, which is why there is no "into Jay" entry in the table. Note also that over a long period of time, the total in must approximately equal the total out, which is why both rows add to cars.) Once inside the network, the traffic may flow in different ways, perhaps filling Willow and leaving Jay mostly empty, or perhaps flowing in some other way. Kirchhoff's Laws give the limits on that freedom.
- Determine the restrictions on the flow inside this network of streets by setting up a variable for each block, establishing the equations, and solving them. Notice that some streets are one-way only. (Hint: this will not yield a unique solution, since traffic can flow through this network in various ways; you should get at least one free variable.)
- Suppose that some construction is proposed for Winooski Avenue East between Willow and Jay, so traffic on that block will be reduced. What is the least amount of traffic flow that can be allowed on that block without disrupting the hourly flow into and out of the network?
Topic: Speed of Gauss' Method
We are using Gauss' Method to solve the linear systems in this book because it is easy to understand, easily shown to give the right answers, and fast. It is fast in that, in all the by-hand calculations we have needed, we have gotten the answers in only a few steps, taking only a few minutes. However, scientists and engineers who solve linear systems in practice must have a method that is fast enough for large systems, with 1000 equations or 10,000 equations or even 100,000 equations. These systems are solved on a computer, so the speed of the machine helps, but nonetheless the speed of the method used is a major consideration, and is sometimes the factor limiting which problems can be solved.
The speed of an algorithm is usually measured by finding how the time taken to solve problems grows as the size of the input data set grows. That is, how much longer will the algorithm take if we increase the size of the input data by a factor of ten, say from a 1000-equation system to a 10,000-equation system, or from 10,000 to 100,000? Does the time taken grow ten times, or a hundred times, or a thousand times? Is the time taken by the algorithm proportional to the size of the data set, or to the square of that size, or to the cube of that size, etc.?
Here is a fragment of Gauss' Method code, implemented in the computer language FORTRAN. The coefficients of the linear system are stored in the array A, and the constants are stored in the array B. For each ROW between and this program has already found the pivot entry . Now it will pivot.
(This code fragment is for illustration only, and is incomplete. For example, see the later topic on the Accuracy of Gauss' Method. Nonetheless, this fragment will do for our purposes because analysis of finished versions, including all the tests and sub-cases, is messier but gives essentially the same result.)
PIVINV=1./A(ROW,COL)
DO 10 I=ROW+1, N
DO 20 J=I, N
A(I,J)=A(I,J)-PIVINV*A(ROW,J)
20 CONTINUE
B(J)=B(J)-PIVINV*B(ROW)
10 CONTINUE
The outermost loop (not shown) runs through rows.
For each of these rows,
the shown loops perform arithmetic on the entries
in A that are below and to the right of the pivot entry
(and also on the entries in B, but to simplify the
analysis we will not count those operations---see Exercise ).
We will assume the pivot is found in the usual place, that is, that
(as above, analysis of the general case is messier but gives essentially
the same result).
That means there are entries to perform
arithmetic on.
On average, ROW will be .
Thus we estimate the nested loops above will run
something like times,
that is, will run in a time proportional to the square of the number
of equations.
Taking into account the outer loop that is not shown, we get
the estimate that the running time of the algorithm
is proportional to the cube of the number of equations.
Algorithms that run in time directly proportional to the size of the data set are fast, algorithms that run in time proportional to the square of the size of the data set are less fast, but typically quite usable, and algorithms that run in time proportional to the cube of the size of the data set are still reasonable in speed.
Speed estimates like these are a good way of understanding how quickly or slowly an algorithm can be expected to run on average. There are special cases, however, of systems on which the above Gauss' method code is especially fast, so there may be factors about a problem that make it especially suitable for this kind of solution.
In practice, the code found in computer algebra systems, or in the standard packages, implements a variant on Gauss' method, called triangular factorization. To state this method requires the language of matrix algebra, which we will not see until Chapter Three. Nonetheless, the above code is conceptually quite close to that usually used in applications.
There have been some theoretical speed-ups in the running time required to solve linear systems. Algorithms other than Gauss' method have been invented that take a time proportional not to the cube of the size of the data set, but instead to the (approximately) power (this is still under active research, so this exponent may come down somewhat over time). However, these theoretical improvements have not come into widespread use, in part because the new methods take a quite large data set before they overtake Gauss' method (although they will outperform Gauss' method on very large sets, there is some startup overhead that keeps them from being faster on the systems that have, so far, been solved in practice).
Exercises
- Problem 1
Computer systems allow the generation of random numbers (of course, these are only pseudo-random, in that they are generated by some algorithm, but the sequence of numbers that is gotten passes a number of reasonable statistical tests for apparent randomness).
- Fill a array with random numbers (say, in the range ). Apply Gauss' method to see if it is singular. Repeat that experiment ten times. Are singular matrices frequent or rare (in this sense)?
- Time the computer at solving ten arrays of random numbers. Find the average time. (Notice that some systems can be found to be singular quite quickly, for instance if the first row equals the second. In the light of the first part, do you expect that singular systems play a large role in your average?)
- Repeat the prior item for arrays.
- Repeat the prior item for arrays.
- Repeat the prior item for arrays.
- Graph the input size versus the average time.
- Problem 2
What array can you invent that takes your computer system the longest to reduce? The shortest?
- Problem 3
Write the rest of the FORTRAN program to do a straightforward implementation of Gauss' method. Compare the speed of your code to that used in a computer algebra system. Which is faster? (Most computer algebra systems will apply some of the techniques of matrix algebra that we will have later, in Chapter Three.)
- Problem 4
Extend the code fragment to handle the case where the B array has more than one column. That solves more than one system at a time (all with the same matrix of coefficients A).
- Problem 5
The FORTRAN language specification requires that arrays be stored "by column", that is, the entire first column is stored contiguously, then the second column, etc. Does the code fragment given take advantage of this, or can it be rewritten to make it faster (by taking advantage of the fact that computer fetches are faster from contiguous locations)?
- Problem 6
Estimate the running time of Gauss-Jordan reduction. Test your estimate by implementing Gauss-Jordan reduction in a computer language, and running it on , , and matrices of random entries.
Chapter II - Vector Spaces
The first chapter began by introducing Gauss' method and finished with a fair understanding, keyed on the Linear Combination Lemma, of how it finds the solution set of a linear system. Gauss' method systematically takes linear combinations of the rows. With that insight, we now move to a general study of linear combinations.
We need a setting for this study. At times in the first chapter, we've combined vectors from , at other times vectors from , and at other times vectors from even higher-dimensional spaces. Thus, our first impulse might be to work in , leaving unspecified. This would have the advantage that any of the results would hold for and for and for many other spaces, simultaneously.
But, if having the results apply to many spaces at once is advantageous then sticking only to 's is overly restrictive. We'd like the results to also apply to combinations of row vectors, as in the final section of the first chapter. We've even seen some spaces that are not just a collection of all of the same-sized column vectors or row vectors. For instance, we've seen a solution set of a homogeneous system that is a plane, inside of . This solution set is a closed system in the sense that a linear combination of these solutions is also a solution. But it is not just a collection of all of the three-tall column vectors; only some of them are in this solution set.
We want the results about linear combinations to apply anywhere that linear combinations are sensible. We shall call any such set a vector space. Our results, instead of being phrased as "Whenever we have a collection in which we can sensibly take linear combinations ...", will be stated as "In any vector space ...".
Such a statement describes at once what happens in many spaces. The step up in abstraction from studying a single space at a time to studying a class of spaces can be hard to make. To understand its advantages, consider this analogy. Imagine that the government made laws one person at a time: "Leslie Jones can't jay walk." That would be a bad idea; statements have the virtue of economy when they apply to many cases at once. Or, suppose that they ruled, "Kim Ke must stop when passing the scene of an accident." Contrast that with, "Any doctor must stop when passing the scene of an accident." More general statements, in some ways, are clearer.
Section I - Definition
![]() |
A Wikibookian suggests that this book or chapter be merged with Linear Algebra/Definition and Examples of Vector Spaces. Please discuss whether or not this merger should happen on the discussion page. |
We shall study structures with two operations, an addition and a scalar multiplication, that are subject to some simple conditions. We will reflect more on the conditions later, but on first reading notice how reasonable they are. For instance, surely any operation that can be called an addition (e.g., column vector addition, row vector addition, or real number addition) will satisfy all the conditions in Definition 1.1 below.
1 - Definition and Examples
- Definition 1.1
A vector space (over ) consists of a set along with two operations "" and "" subject to these conditions.
- For any .
- For any .
- For any .
- There is a zero vector such that for all .
- Each has an additive inverse such that .
- If is a scalar, that is, a member of and then the scalar multiple is in .
- If and then .
- If and , then .
- If and , then
- For any , .
- Remark 1.2
Because it involves two kinds of addition and two kinds of multiplication, that definition may seem confused. For instance, in condition 7 "", the first "" is the real number addition operator while the "" to the right of the equals sign represents vector addition in the structure . These expressions aren't ambiguous because, e.g., and are real numbers so "" can only mean real number addition.
The best way to go through the examples below is to check all ten conditions in the definition. That check is written out at length in the first example. Use it as a model for the others. Especially important are the first condition " is in " and the sixth condition " is in ". These are the closure conditions. They specify that the addition and scalar multiplication operations are always sensible — they are defined for every pair of vectors, and every scalar and vector, and the result of the operation is a member of the set (see Example 1.4).
- Example 1.3
The set is a vector space if the operations "" and "" have their usual meaning.
We shall check all of the conditions.
There are five conditions in item 1. For 1, closure of addition, note that for any the result of the sum
is a column array with two real entries, and so is in . For 2, that addition of vectors commutes, take all entries to be real numbers and compute
(the second equality follows from the fact that the components of the vectors are real numbers, and the addition of real numbers is commutative). Condition 3, associativity of vector addition, is similar.
For the fourth condition we must produce a zero element — the vector of zeroes is it.
For 5, to produce an additive inverse, note that for any we have
so the first vector is the desired additive inverse of the second.
The checks for the five conditions having to do with scalar multiplication are just as routine. For 6, closure under scalar multiplication, where ,
is a column array with two real entries, and so is in . Next, this checks 7.
For 8, that scalar multiplication distributes from the left over vector addition, we have this.
The ninth
and tenth conditions are also straightforward.
In a similar way, each is a vector space with the usual operations of vector addition and scalar multiplication. (In , we usually do not write the members as column vectors, i.e., we usually do not write "". Instead we just write "".)
- Example 1.4
- This subset of that is a plane through the origin
is a vector space if "+" and "" are interpreted in this way.
The addition and scalar multiplication operations here are just the ones of , reused on its subset . We say that inherits these operations from . This example of an addition in
illustrates that is closed under addition. We've added two vectors from — that is, with the property that the sum of their three entries is zero— and the result is a vector also in . Of course, this example of closure is not a proof of closure. To prove that is closed under addition, take two elements of
(membership in means that and ), and observe that their sum
is also in since its entries add to . To show that is closed under scalar multiplication, start with a vector from
(so that ) and then for observe that the scalar multiple
satisfies that . Thus the two closure conditions are satisfied. Verification of the other conditions in the definition of a vector space are just as straightforward.
- Example 1.5
Example 1.3 shows that the set of all two-tall vectors with real entries is a vector space. Example 1.4 gives a subset of an that is also a vector space. In contrast with those two, consider the set of two-tall columns with entries that are integers (under the obvious operations). This is a subset of a vector space, but it is not itself a vector space. The reason is that this set is not closed under scalar multiplication, that is, it does not satisfy condition 6. Here is a column with integer entries, and a scalar, such that the outcome of the operation
is not a member of the set, since its entries are not all integers.
- Example 1.6
The singleton set
is a vector space under the operations
that it inherits from .
A vector space must have at least one element, its zero vector. Thus a one-element vector space is the smallest one possible.
- Definition 1.7
A one-element vector space is a trivial space.
- Warning!
The examples so far involve sets of column vectors with the usual operations. But vector spaces need not be collections of column vectors, or even of row vectors. Below are some other types of vector spaces. The term "vector space" does not mean "collection of columns of reals". It means something more like "collection in which any linear combination is sensible".
Examples
- Example 1.8
Consider , the set of polynomials of degree three or less (in this book, we'll take constant polynomials, including the zero polynomial, to be of degree zero). It is a vector space under the operations
and
(the verification is easy). This vector space is worthy of attention because these are the polynomial operations familiar from high school algebra. For instance, .
Although this space is not a subset of any , there is a sense in which we can think of as "the same" as . If we identify these two spaces's elements in this way
then the operations also correspond. Here is an example of corresponding additions.
Things we are thinking of as "the same" add to "the same" sum. Chapter Three makes precise this idea of vector space correspondence. For now we shall just leave it as an intuition.
- Example 1.9
The set of matrices with real number entries is a vector space under the natural entry-by-entry operations.
As in the prior example, we can think of this space as "the same" as .
- Example 1.10
The set of all real-valued functions of one natural number variable is a vector space under the operations
so that if, for example, and then .
We can view this space as a generalization of Example 1.3— instead of -tall vectors, these functions are like infinitely-tall vectors.
Addition and scalar multiplication are component-wise, as in Example 1.3. (We can formalize "infinitely-tall" by saying that it means an infinite sequence, or that it means a function from to .)
- Example 1.11
The set of polynomials with real coefficients
makes a vector space when given the natural ""
and "".
This space differs from the space of Example 1.8. This space contains not just degree three polynomials, but degree thirty polynomials and degree three hundred polynomials, too. Each individual polynomial of course is of a finite degree, but the set has no single bound on the degree of all of its members.
This example, like the prior one, can be thought of in terms of infinite-tuples. For instance, we can think of as corresponding to . However, don't confuse this space with the one from Example 1.10. Each member of this set has a bounded degree, so under our correspondence there are no elements from this space matching . The vectors in this space correspond to infinite-tuples that end in zeroes.
- Example 1.12
The set of all real-valued functions of one real variable is a vector space under these.
The difference between this and Example 1.10 is the domain of the functions.
- Example 1.13
The set of real-valued functions of the real variable is a vector space under the operations
and
inherited from the space in the prior example. (We can think of as "the same" as in that corresponds to the vector with components and .)
- Example 1.14
The set
is a vector space under the, by now natural, interpretation.
In particular, notice that closure is a consequence:
and
of basic Calculus. This turns out to equal the space from the prior example— functions satisfying this differential equation have the form — but this description suggests an extension to solutions sets of other differential equations.
- Example 1.15
The set of solutions of a homogeneous linear system in variables is a vector space under the operations inherited from . For closure under addition, if
both satisfy the condition that their entries add to then also satisfies that condition: . The checks of the other conditions are just as routine.
As we've done in those equations, we often omit the multiplication symbol "". We can distinguish the multiplication in "" from that in "" since if both multiplicands are real numbers then real-real multiplication must be meant, while if one is a vector then scalar-vector multiplication must be meant.
The prior example has brought us full circle since it is one of our motivating examples.
- Remark 1.16
Now, with some feel for the kinds of structures that satisfy the definition of a vector space, we can reflect on that definition. For example, why specify in the definition the condition that but not a condition that ?
One answer is that this is just a definition— it gives the rules of the game from here on, and if you don't like it, put the book down and walk away.
Another answer is perhaps more satisfying. People in this area have worked hard to develop the right balance of power and generality. This definition has been shaped so that it contains the conditions needed to prove all of the interesting and important properties of spaces of linear combinations. As we proceed, we shall derive all of the properties natural to collections of linear combinations from the conditions given in the definition.
The next result is an example. We do not need to include these properties in the definition of vector space because they follow from the properties already listed there.
- Lemma 1.17
In any vector space , for any and , we have
- , and
- , and
- .
- Proof
For 1, note that . Add to both sides the additive inverse of , the vector such that .
The second item is easy: shows that we can write "" for the additive inverse of without worrying about possible confusion with .
For 3, this will do.
Summary
We finish with a recap.
Our study in Chapter One of Gaussian reduction led us to consider collections of linear combinations. So in this chapter we have defined a vector space to be a structure in which we can form such combinations, expressions of the form (subject to simple conditions on the addition and scalar multiplication operations). In a phrase: vector spaces are the right context in which to study linearity.
Finally, a comment. From the fact that it forms a whole chapter, and especially because that chapter is the first one, a reader could come to think that the study of linear systems is our purpose. The truth is, we will not so much use vector spaces in the study of linear systems as we will instead have linear systems start us on the study of vector spaces. The wide variety of examples from this subsection shows that the study of vector spaces is interesting and important in its own right, aside from how it helps us understand linear systems. Linear systems won't go away. But from now on our primary objects of study will be vector spaces.
Exercises
- Problem 1
Name the zero vector for each of these vector spaces.
- The space of degree three polynomials under the natural operations
- The space of matrices
- The space
- The space of real-valued functions of one natural number variable
- This exercise is recommended for all readers.
- Problem 2
Find the additive inverse, in the vector space, of the vector.
- In , the vector .
- In the space ,
- In , the space of functions of the real variable under the natural operations, the vector .
- This exercise is recommended for all readers.
- Problem 3
Show that each of these is a vector space.
- The set of linear polynomials under the usual polynomial addition and scalar multiplication operations.
- The set of matrices with real entries under the usual matrix operations.
- The set of three-component row vectors with their usual operations.
- The set
- This exercise is recommended for all readers.
- Problem 4
Show that each of these is not a vector space. (Hint. Start by listing two members of each set.)
- Under the operations inherited from , this set
- Under the operations inherited from , this set
- Under the usual matrix operations,
- Under the usual polynomial operations,
- Under the inherited operations,
- Problem 5
Define addition and scalar multiplication operations to make the complex numbers a vector space over .
- This exercise is recommended for all readers.
- Problem 6
Is the set of rational numbers a vector space over under the usual addition and scalar multiplication operations?
- Problem 7
Show that the set of linear combinations of the variables is a vector space under the natural addition and scalar multiplication operations.
- Problem 8
Prove that this is not a vector space: the set of two-tall column vectors with real entries subject to these operations.
- Problem 9
Prove or disprove that is a vector space under these operations.
- This exercise is recommended for all readers.
- Problem 10
For each, decide if it is a vector space; the intended operations are the natural ones.
- The diagonal matrices
- This set of matrices
- This set
- The set of functions
- The set of functions
- This exercise is recommended for all readers.
- Problem 11
Prove or disprove that this is a vector space: the real-valued functions of one real variable such that .
- This exercise is recommended for all readers.
- Problem 12
Show that the set of positive reals is a vector space when "" is interpreted to mean the product of and (so that is ), and "" is interpreted as the -th power of .
- Problem 13
Is a vector space under these operations?
- and
- and
- Problem 14
Prove or disprove that this is a vector space: the set of polynomials of degree greater than or equal to two, along with the zero polynomial.
- Problem 15
At this point "the same" is only an intuition, but nonetheless for each vector space identify the for which the space is "the same" as .
- The matrices under the usual operations
- The matrices (under their usual operations)
- This set of matrices
- This set of matrices
- This exercise is recommended for all readers.
- Problem 16
Using to represent vector addition and for scalar multiplication, restate the definition of vector space.
- This exercise is recommended for all readers.
- Problem 17
Prove these.
- Any vector is the additive inverse of the additive inverse of itself.
- Vector addition left-cancels: if then implies that .
- Problem 18
The definition of vector spaces does not explicitly say that (it instead says that ). Show that it must nonetheless hold in any vector space.
- This exercise is recommended for all readers.
- Problem 19
Prove or disprove that this is a vector space: the set of all matrices, under the usual operations.
- Problem 20
In a vector space every element has an additive inverse. Can some elements have two or more?
- Problem 21
- Prove that every point, line, or plane thru the origin in is a vector space under the inherited operations.
- What if it doesn't contain the origin?
- This exercise is recommended for all readers.
- Problem 22
Using the idea of a vector space we can easily reprove that the solution set of a homogeneous linear system has either one element or infinitely many elements. Assume that is not .
- Prove that if and only if .
- Prove that if and only if .
- Prove that any nontrivial vector space is infinite.
- Use the fact that a nonempty solution set of a homogeneous linear system is a vector space to draw the conclusion.
- Problem 23
Is this a vector space under the natural operations: the real-valued functions of one real variable that are differentiable?
- Problem 24
A vector space over the complex numbers has the same definition as a vector space over the reals except that scalars are drawn from instead of from . Show that each of these is a vector space over the complex numbers. (Recall how complex numbers add and multiply: and .)
- The set of degree two polynomials with complex coefficients
- This set
- Problem 25
Name a property shared by all of the 's but not listed as a requirement for a vector space.
- This exercise is recommended for all readers.
- Problem 26
- Prove that a sum of four vectors can be associated in any way without changing the result.
- Prove that any two ways of associating a sum of any number of vectors give the same sum. (Hint. Use induction on the number of vectors.)
- Problem 27
For any vector space, a subset that is itself a vector space under the inherited operations (e.g., a plane through the origin inside of ) is a subspace.
- Show that is a subspace of the vector space of degree two polynomials.
- Show that this is a subspace of the matrices.
- Show that a nonempty subset of a real vector space is a subspace if and only if it is closed under linear combinations of pairs of vectors: whenever and then the combination is in .
2 - Subspaces and Spanning sets
One of the examples that led us to introduce the idea of a vector space was the solution set of a homogeneous system. For instance, we've seen in Example 1.4 such a space that is a planar subset of . There, the vector space contains inside it another vector space, the plane.
- Definition 2.1
For any vector space, a subspace is a subset that is itself a vector space, under the inherited operations.
- Example 2.2
The plane from the prior subsection,
is a subspace of . As specified in the definition, the operations are the ones that are inherited from the larger space, that is, vectors add in as they add in
and scalar multiplication is also the same as it is in . To show that is a subspace, we need only note that it is a subset and then verify that it is a space. Checking that satisfies the conditions in the definition of a vector space is routine. For instance, for closure under addition, just note that if the summands satisfy that and then the sum satisfies that .
- Example 2.3
The -axis in is a subspace where the addition and scalar multiplication operations are the inherited ones.
As above, to verify that this is a subspace, we simply note that it is a subset and then check that it satisfies the conditions in definition of a vector space. For instance, the two closure conditions are satisfied: (1) adding two vectors with a second component of zero results in a vector with a second component of zero, and (2) multiplying a scalar times a vector with a second component of zero results in a vector with a second component of zero.
- Example 2.4
Another subspace of is
its trivial subspace.
Any vector space has a trivial subspace . At the opposite extreme, any vector space has itself for a subspace. These two are the improper subspaces. Other subspaces are proper.
- Example 2.5
The condition in the definition requiring that the addition and scalar multiplication operations must be the ones inherited from the larger space is important. Consider the subset of the vector space . Under the operations and that set is a vector space, specifically, a trivial space. But it is not a subspace of because those aren't the inherited operations, since of course has .
- Example 2.6
All kinds of vector spaces, not just 's, have subspaces. The vector space of cubic polynomials has a subspace comprised of all linear polynomials .
- Example 2.7
Another example of a subspace not taken from an is one from the examples following the definition of a vector space. The space of all real-valued functions of one real variable has a subspace of functions satisfying the restriction .
- Example 2.8
Being vector spaces themselves, subspaces must satisfy the closure conditions. The set is not a subspace of the vector space because with the inherited operations it is not closed under scalar multiplication: if then .
The next result says that Example 2.8 is prototypical. The only way that a subset can fail to be a subspace (if it is nonempty and the inherited operations are used) is if it isn't closed.
- Lemma 2.9
For a nonempty subset of a vector space, under the inherited operations, the following are equivalent statements.[1]
- is a subspace of that vector space
- is closed under linear combinations of pairs of vectors: for any vectors and scalars the vector is in
- is closed under linear combinations of any number of vectors: for any vectors and scalars the vector is in .
Briefly, the way that a subset gets to be a subspace is by being closed under linear combinations.
- Proof
"The following are equivalent" means that each pair of statements are equivalent.
We will show this equivalence by establishing that . This strategy is suggested by noticing that and are easy and so we need only argue the single implication .
For that argument, assume that is a nonempty subset of a vector space and that is closed under combinations of pairs of vectors. We will show that is a vector space by checking the conditions.
The first item in the vector space definition has five conditions. First, for closure under addition, if then , as . Second, for any , because addition is inherited from , the sum in equals the sum in , and that equals the sum in (because is a vector space, its addition is commutative), and that in turn equals the sum in . The argument for the third condition is similar to that for the second. For the fourth, consider the zero vector of and note that closure of under linear combinations of pairs of vectors gives that (where is any member of the nonempty set ) is in ; showing that acts under the inherited operations as the additive identity of is easy. The fifth condition is satisfied because for any , closure under linear combinations shows that the vector is in ; showing that it is the additive inverse of under the inherited operations is routine.
The checks for item 2 are similar and are saved for Problem 13.
We usually show that a subset is a subspace with .
- Remark 2.10
At the start of this chapter we introduced vector spaces as collections in which linear combinations are "sensible". The above result speaks to this.
The vector space definition has ten conditions but eight of them— the conditions not about closure— simply ensure that referring to the operations as an "addition" and a "scalar multiplication" is sensible. The proof above checks that these eight are inherited from the surrounding vector space provided that the nonempty set satisfies Lemma 2.9's statement (2) (e.g., commutativity of addition in follows right from commutativity of addition in ). So, in this context, this meaning of "sensible" is automatically satisfied.
In assuring us that this first meaning of the word is met, the result draws our attention to the second meaning of "sensible". It has to do with the two remaining conditions, the closure conditions. Above, the two separate closure conditions inherent in statement (1) are combined in statement (2) into the single condition of closure under all linear combinations of two vectors, which is then extended in statement (3) to closure under combinations of any number of vectors. The latter two statements say that we can always make sense of an expression like , without restrictions on the 's— such expressions are "sensible" in that the vector described is defined and is in the set .
This second meaning suggests that a good way to think of a vector space is as a collection of unrestricted linear combinations. The next two examples take some spaces and describe them in this way. That is, in these examples we parametrize, just as we did in Chapter One to describe the solution set of a homogeneous linear system.
- Example 2.11
This subset of
is a subspace under the usual addition and scalar multiplication operations of column vectors (the check that it is nonempty and closed under linear combinations of two vectors is just like the one in Example 2.2). To parametrize, we can take to be a one-equation linear system and expressing the leading variable in terms of the free variables .
Now the subspace is described as the collection of unrestricted linear combinations of those two vectors. Of course, in either description, this is a plane through the origin.
- Example 2.12
This is a subspace of the matrices
(checking that it is nonempty and closed under linear combinations is easy). To parametrize, express the condition as .
As above, we've described the subspace as a collection of unrestricted linear combinations (by coincidence, also of two elements).
Parametrization is an easy technique, but it is important. We shall use it often.
- Definition 2.13
The span(or linear closure) of a nonempty subset of a vector space is the set of all linear combinations of vectors from .
The span of the empty subset of a vector space is the trivial subspace.
No notation for the span is completely standard. The square brackets used here are common, but so are "" and "".
- Remark 2.14
In Chapter One, after we showed that the solution set of a homogeneous linear system can be written as , we described that as the set "generated" by the 's. We now have the technical term; we call that the "span" of the set .
Recall also the discussion of the "tricky point" in that proof. The span of the empty set is defined to be the set because we follow the convention that a linear combination of no vectors sums to . Besides, defining the empty set's span to be the trivial subspace is a convenience in that it keeps results like the next one from having annoying exceptional cases.
- Lemma 2.15
In a vector space, the span of any subset is a subspace.
- Proof
Call the subset . If is empty then by definition its span is the trivial subspace. If is not empty then by Lemma 2.9 we need only check that the span is closed under linear combinations. For a pair of vectors from that span, and , a linear combination
(, scalars) is a linear combination of elements of and so is in (possibly some of the 's forming equal some of the 's from , but it does not matter).
The converse of the lemma holds: any subspace is the span of some set, because a subspace is obviously the span of the set of its members. Thus a subset of a vector space is a subspace if and only if it is a span. This fits the intuition that a good way to think of a vector space is as a collection in which linear combinations are sensible.
Taken together, Lemma 2.9 and Lemma 2.15 show that the span of a subset of a vector space is the smallest subspace containing all the members of .
- Example 2.16
In any vector space , for any vector , the set is a subspace of . For instance, for any vector , the line through the origin containing that vector, is a subspace of . This is true even when is the zero vector, in which case the subspace is the degenerate line, the trivial subspace.
- Example 2.17
The span of this set is all of .
To check this we must show that any member of is a linear combination of these two vectors. So we ask: for which vectors (with real components and ) are there scalars and such that this holds?
Gauss' method
with back substitution gives and . These two equations show that for any and that we start with, there are appropriate coefficients and making the above vector equation true. For instance, for and the coefficients and will do. That is, any vector in can be written as a linear combination of the two given vectors.
Since spans are subspaces, and we know that a good way to understand a subspace is to parametrize its description, we can try to understand a set's span in that way.
- Example 2.18
Consider, in , the span of the set . By the definition of span, it is the set of unrestricted linear combinations of the two . Clearly polynomials in this span must have a constant term of zero. Is that necessary condition also sufficient?
We are asking: for which members of are there and such that ? Since polynomials are equal if and only if their coefficients are equal, we are looking for conditions on , , and satisfying these.
Gauss' method gives that , , and . Thus the only condition on polynomials in the span is the condition that we knew of— as long as , we can give appropriate coefficients and to describe the polynomial as in the span. For instance, for the polynomial , the coefficients and will do. So the span of the given set is .
This shows, incidentally, that the set also spans this subspace. A space can have more than one spanning set. Two other sets spanning this subspace are and . (Naturally, we usually prefer to work with spanning sets that have only a few members.)
- Example 2.19
These are the subspaces of that we now know of, the trivial subspace, the lines through the origin, the planes through the origin, and the whole space (of course, the picture shows only a few of the infinitely many subspaces). In the next section we will prove that has no other type of subspaces, so in fact this picture shows them all.
The subsets are described as spans of sets, using a minimal number of members, and are shown connected to their supersets. Note that these subspaces fall naturally into levels— planes on one level, lines on another, etc.— according to how many vectors are in a minimal-sized spanning set.
So far in this chapter we have seen that to study the properties of linear combinations, the right setting is a collection that is closed under these combinations. In the first subsection we introduced such collections, vector spaces, and we saw a great variety of examples. In this subsection we saw still more spaces, ones that happen to be subspaces of others. In all of the variety we've seen a commonality. Example 2.19 above brings it out: vector spaces and subspaces are best understood as a span, and especially as a span of a small number of vectors. The next section studies spanning sets that are minimal.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Which of these subsets of the vector space of matrices are subspaces under the inherited operations? For each one that is a subspace, parametrize its description. For each that is not, give a condition that fails.
- This exercise is recommended for all readers.
- Problem 2
Is this a subspace of : ? If it is then parametrize its description.
- This exercise is recommended for all readers.
- Problem 3
Decide if the vector lies in the span of the set, inside of the space.
- , , in
- , , in
- , , in
- Problem 4
Which of these are members of the span in the vector space of real-valued functions of one real variable?
- This exercise is recommended for all readers.
- Problem 5
Which of these sets spans ? That is, which of these sets has the property that any three-tall vector can be expressed as a suitable linear combination of the set's elements?
- This exercise is recommended for all readers.
- Problem 6
Parametrize each subspace's description. Then express each subspace as a span.
- The subset of the three-wide row vectors
- This subset of
- This subset of
- The subset of
- The subset of of quadratic polynomials such that
- This exercise is recommended for all readers.
- Problem 7
Find a set to span the given subspace of the given space. (Hint. Parametrize each.)
- the -plane in
- in
- in
- in
- The set in the space
- in
- Problem 8
Is a subspace of ?
- This exercise is recommended for all readers.
- Problem 9
Decide if each is a subspace of the vector space of real-valued functions of one real variable.
- The even functions . For example, two members of this set are and .
- The odd functions . Two members are and .
- Problem 10
Example 2.16 says that for any vector that is an element of a vector space , the set is a subspace of . (This is of course, simply the span of the singleton set .) Must any such subspace be a proper subspace, or can it be improper?
- Problem 11
An example following the definition of a vector space shows that the solution set of a homogeneous linear system is a vector space. In the terminology of this subsection, it is a subspace of where the system has variables. What about a non-homogeneous linear system; do its solutions form a subspace (under the inherited operations)?
- Problem 12
Example 2.19 shows that has infinitely many subspaces. Does every nontrivial space have infinitely many subspaces?
- Problem 13
Finish the proof of Lemma 2.9.
- Problem 14
Show that each vector space has only one trivial subspace.
- This exercise is recommended for all readers.
- Problem 15
Show that for any subset of a vector space, the span of the span equals the span . (Hint. Members of are linear combinations of members of . Members of are linear combinations of linear combinations of members of .)
- Problem 16
All of the subspaces that we've seen use zero in their description in some way. For example, the subspace in Example 2.3 consists of all the vectors from with a second component of zero. In contrast, the collection of vectors from with a second component of one does not form a subspace (it is not closed under scalar multiplication). Another example is Example 2.2, where the condition on the vectors is that the three components add to zero. If the condition were that the three components add to one then it would not be a subspace (again, it would fail to be closed). This exercise shows that a reliance on zero is not strictly necessary. Consider the set
under these operations.
- Show that it is not a subspace of . (Hint. See Example 2.5).
- Show that it is a vector space. Note that by the prior item, Lemma 2.9 can not apply.
- Show that any subspace of must pass through the origin, and so any subspace of must involve zero in its description. Does the converse hold? Does any subset of that contains the origin become a subspace when given the inherited operations?
- Problem 17
We can give a justification for the convention that the sum of zero-many vectors equals the zero vector. Consider this sum of three vectors .
- What is the difference between this sum of three vectors and the sum of the first two of these three?
- What is the difference between the prior sum and the sum of just the first one vector?
- What should be the difference between the prior sum of one vector and the sum of no vectors?
- So what should be the definition of the sum of no vectors?
- Problem 18
Is a space determined by its subspaces? That is, if two vector spaces have the same subspaces, must the two be equal?
- Problem 19
- Give a set that is closed under scalar multiplication but not addition.
- Give a set closed under addition but not scalar multiplication.
- Give a set closed under neither.
- Problem 20
Show that the span of a set of vectors does not depend on the order in which the vectors are listed in that set.
- Problem 21
Which trivial subspace is the span of the empty set? Is it
or some other subspace?
- Problem 22
Show that if a vector is in the span of a set then adding that vector to the set won't make the span any bigger. Is that also "only if"?
- This exercise is recommended for all readers.
- Problem 23
Subspaces are subsets and so we naturally consider how "is a subspace of" interacts with the usual set operations.
- If are subspaces of a vector space, must be a subspace? Always? Sometimes? Never?
- Must be a subspace?
- If is a subspace, must its complement be a subspace?
(Hint. Try some test subspaces from Example 2.19.)
- This exercise is recommended for all readers.
- Problem 24
Does the span of a set depend on the enclosing space? That is, if is a subspace of and is a subset of (and so also a subset of ), might the span of in differ from the span of in ?
- Problem 25
Is the relation "is a subspace of" transitive? That is, if is a subspace of and is a subspace of , must be a subspace of ?
- This exercise is recommended for all readers.
- Problem 26
Because "span of" is an operation on sets we naturally consider how it interacts with the usual set operations.
- If are subsets of a vector space, is ? Always? Sometimes? Never?
- If are subsets of a vector space, is ?
- If are subsets of a vector space, is ?
- Is the span of the complement equal to the complement of the span?
- Problem 27
Reprove Lemma 2.15 without doing the empty set separately.
- Problem 28
Find a structure that is closed under linear combinations, and yet is not a vector space. (Remark. This is a bit of a trick question.)
Section II - Linear Independence
The prior section shows that a vector space can be understood as an unrestricted linear combination of some of its elements— that is, as a span. For example, the space of linear polynomials is spanned by the set . The prior section also showed that a space can have many sets that span it. The space of linear polynomials is also spanned by and .
At the end of that section we described some spanning sets as "minimal", but we never precisely defined that word. We could take "minimal" to mean one of two things. We could mean that a spanning set is minimal if it contains the smallest number of members of any set with the same span. With this meaning is not minimal because it has one member more than the other two. Or we could mean that a spanning set is minimal when it has no elements that can be removed without changing the span. Under this meaning is not minimal because removing the and getting leaves the span unchanged.
The first sense of minimality appears to be a global requirement, in that to check if a spanning set is minimal we seemingly must look at all the spanning sets of a subspace and find one with the least number of elements. The second sense of minimality is local in that we need to look only at the set under discussion and consider the span with and without various elements. For instance, using the second sense, we could compare the span of with the span of and note that the is a "repeat" in that its removal doesn't shrink the span.
In this section we will use the second sense of "minimal spanning set" because of this technical convenience. However, the most important result of this book is that the two senses coincide; we will prove that in the section after this one.
1 - Definition and Examples
Spanning Sets and Linear Independence
We first characterize when a vector can be removed from a set without changing the span of that set.
- Lemma 1.1
Where is a subset of a vector space ,
for any .
- Proof
The left to right implication is easy. If then, since , the equality of the two sets gives that .
For the right to left implication assume that to show that by mutual inclusion. The inclusion is obvious. For the other inclusion , write an element of as and substitute 's expansion as a linear combination of members of the same set . This is a linear combination of linear combinations and so distributing results in a linear combination of vectors from . Hence each member of is also a member of .
- Example 1.2
In , where
the spans and are equal since is in the span .
The lemma says that if we have a spanning set then we can remove a to get a new set with the same span if and only if is a linear combination of vectors from . Thus, under the second sense described above, a spanning set is minimal if and only if it contains no vectors that are linear combinations of the others in that set. We have a term for this important property.
- Definition 1.3
A subset of a vector space is linearly independent if none of its elements is a linear combination of the others. Otherwise it is linearly dependent.
Here is an important observation:
although this way of writing one vector as a combination of the others visually sets off from the other vectors, algebraically there is nothing special in that equation about . For any with a coefficient that is nonzero, we can rewrite the relationship to set off .
When we don't want to single out any vector by writing it alone on one side of the equation we will instead say that are in a linear relationship and write the relationship with all of the vectors on the same side. The next result rephrases the linear independence definition in this style. It gives what is usually the easiest way to compute whether a finite set is dependent or independent.
- Lemma 1.4
A subset of a vector space is linearly independent if and only if for any distinct the only linear relationship among those vectors
is the trivial one: .
- Proof
This is a direct consequence of the observation above.
If the set is linearly independent then no vector can be written as a linear combination of the other vectors from so there is no linear relationship where some of the 's have nonzero coefficients. If is not linearly independent then some is a linear combination of other vectors from , and subtracting from both sides of that equation gives a linear relationship involving a nonzero coefficient, namely the in front of .
- Example 1.5
In the vector space of two-wide row vectors, the two-element set is linearly independent. To check this, set
and solving the resulting system
shows that both and are zero. So the only linear relationship between the two given row vectors is the trivial relationship.
In the same vector space, is linearly dependent since we can satisfy
with and .
- Remark 1.6
Recall the Statics example that began this book. We first set the unknown-mass objects at cm and cm and got a balance, and then we set the objects at cm and cm and got a balance. With those two pieces of information we could compute values of the unknown masses. Had we instead first set the unknown-mass objects at cm and cm, and then at cm and cm, we would not have been able to compute the values of the unknown masses (try it). Intuitively, the problem is that the information is a "repeat" of the information— that is, is in the span of the set — and so we would be trying to solve a two-unknowns problem with what is essentially one piece of information.
- Example 1.7
The set is linearly independent in , the space of quadratic polynomials with real coefficients, because
gives
since polynomials are equal only if their coefficients are equal. Thus, the only linear relationship between these two members of is the trivial one.
- Example 1.8
In , where
the set is linearly dependent because this is a relationship
where not all of the scalars are zero (the fact that some of the scalars are zero doesn't matter).
- Remark 1.9
That example illustrates why, although Definition 1.3 is a clearer statement of what independence is, Lemma 1.4 is more useful for computations. Working straight from the definition, someone trying to compute whether is linearly independent would start by setting and concluding that there are no such and . But knowing that the first vector is not dependent on the other two is not enough. This person would have to go on to try to find the dependence , . Lemma 1.4 gets the same conclusion with only one computation.
- Example 1.10
The empty subset of a vector space is linearly independent. There is no nontrivial linear relationship among its members as it has no members.
- Example 1.11
In any vector space, any subset containing the zero vector is linearly dependent. For example, in the space of quadratic polynomials, consider the subset .
One way to see that this subset is linearly dependent is to use Lemma 1.4: we have , and this is a nontrivial relationship as not all of the coefficients are zero. Another way to see that this subset is linearly dependent is to go straight to Definition 1.3: we can express the third member of the subset as a linear combination of the first two, namely, is satisfied by taking and (in contrast to the lemma, the definition allows all of the coefficients to be zero).
(There is still another way to see that this subset is dependent that is subtler. The zero vector is equal to the trivial sum, that is, it is the sum of no vectors. So in a set containing the zero vector, there is an element that can be written as a combination of a collection of other vectors from the set, specifically, the zero vector can be written as a combination of the empty collection.)
The above examples, especially Example 1.5, underline the discussion that begins this section. The next result says that given a finite set, we can produce a linearly independent subset by discarding what Remark 1.6 calls "repeats".
- Theorem 1.12
In a vector space, any finite subset has a linearly independent subset with the same span.
- Proof
If the set is linearly independent then itself satisfies the statement, so assume that it is linearly dependent.
By the definition of dependence, there is a vector that is a linear combination of the others. Call that vector . Discard it— define the set . By Lemma 1.1, the span does not shrink .
Now, if is linearly independent then we are finished. Otherwise iterate the prior paragraph: take a vector that is a linear combination of other members of and discard it to derive such that . Repeat this until a linearly independent set appears; one must appear eventually because is finite and the empty set is linearly independent. (Formally, this argument uses induction on , the number of elements in the starting set. Problem 20 asks for the details.)
- Example 1.13
This set spans .
Looking for a linear relationship
gives a three equations/five unknowns linear system whose solution set can be parametrized in this way.
So is linearly dependent. Setting and shows that the fifth vector is a linear combination of the first two. Thus, Lemma 1.1 says that discarding the fifth vector
leaves the span unchanged . Now, the third vector of is a linear combination of the first two and we get
with the same span as , and therefore the same span as , but with one difference. The set is linearly independent (this is easily checked), and so discarding any of its elements will shrink the span.
Linear Independence and Subset Relations
Theorem 1.12 describes producing a linearly independent set by shrinking, that is, by taking subsets. We finish this subsection by considering how linear independence and dependence, which are properties of sets, interact with the subset relation between sets.
- Lemma 1.14
Any subset of a linearly independent set is also linearly independent. Any superset of a linearly dependent set is also linearly dependent.
- Proof
This is clear.
Restated, independence is preserved by subset and dependence is preserved by superset.
Those are two of the four possible cases of interaction that we can consider. The third case, whether linear dependence is preserved by the subset operation, is covered by Example 1.13, which gives a linearly dependent set with a subset that is linearly dependent and another subset that is linearly independent.
That leaves one case, whether linear independence is preserved by superset. The next example shows what can happen.
- Example 1.15
In each of these three paragraphs the subset is linearly independent.
For the set
the span is the axis. Here are two supersets of , one linearly dependent and the other linearly independent.
dependent: independent:
Checking the dependence or independence of these sets is easy.
For
the span is the plane. These are two supersets.
dependent: independent:
If
then . A linearly dependent superset is
dependent:
but there are no linearly independent supersets of . The reason is that for any vector that we would add to make a superset, the linear dependence equation
has a solution , , and .
So, in general, a linearly independent set may have a superset that is dependent. And, in general, a linearly independent set may have a superset that is independent. We can characterize when the superset is one and when it is the other.
- Lemma 1.16
Where is a linearly independent subset of a vector space ,
for any with .
- Proof
One implication is clear: if then where each and , and so is a nontrivial linear relationship among elements of .
The other implication requires the assumption that is linearly independent. With linearly dependent, there is a nontrivial linear relationship and independence of then implies that , or else that would be a nontrivial relationship among members of . Now rewriting this equation as shows that .
(Compare this result with Lemma 1.1. Both say, roughly, that is a "repeat" if it is in the span of . However, note the additional hypothesis here of linear independence.)
- Corollary 1.17
A subset of a vector space is linearly dependent if and only if some is a linear combination of the vectors , ..., listed before it.
- Proof
Consider , , , etc. Some index is the first one with linearly dependent, and there .
Lemma 1.16 can be restated in terms of independence instead of dependence: if is linearly independent and then the set is also linearly independent if and only if Applying Lemma 1.1, we conclude that if is linearly independent and then is also linearly independent if and only if . Briefly, when passing from to a superset , to preserve linear independence we must expand the span .
Example 1.15 shows that some linearly independent sets are maximal— have as many elements as possible— in that they have no supersets that are linearly independent. By the prior paragraph, a linearly independent sets is maximal if and only if it spans the entire space, because then no vector exists that is not already in the span.
This table summarizes the interaction between the properties of independence and dependence and the relations of subset and superset.
independent |
| |||||
dependent |
In developing this table we've uncovered an intimate relationship between linear independence and span. Complementing the fact that a spanning set is minimal if and only if it is linearly independent, a linearly independent set is maximal if and only if it spans the space.
In summary, we have introduced the definition of linear independence to formalize the idea of the minimality of a spanning set. We have developed some properties of this idea. The most important is Lemma 1.16, which tells us that a linearly independent set is maximal when it spans the space.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Decide whether each subset of is linearly dependent or linearly independent.
- This exercise is recommended for all readers.
- Problem 2
Which of these subsets of are linearly dependent and which are independent?
- This exercise is recommended for all readers.
- Problem 3
Prove that each set is linearly independent in the vector space of all functions from to .
- and
- and
- and
- This exercise is recommended for all readers.
- Problem 4
Which of these subsets of the space of real-valued functions of one real variable is linearly dependent and which is linearly independent? (Note that we have abbreviated some constant functions; e.g., in the first item, the "" stands for the constant function .)
- Problem 5
Does the equation show that this set of functions is a linearly dependent subset of the set of all real-valued functions with domain the interval of real numbers between and ?
- Problem 6
Why does Lemma 1.4 say "distinct"?
- This exercise is recommended for all readers.
- Problem 7
Show that the nonzero rows of an echelon form matrix form a linearly independent set.
- This exercise is recommended for all readers.
- Problem 8
- Show that if the set is linearly independent set then so is the set .
- What is the relationship between the linear independence or dependence of the set and the independence or dependence of ?
- Problem 9
Example 1.10 shows that the empty set is linearly independent.
- When is a one-element set linearly independent?
- How about a set with two elements?
- Problem 10
In any vector space , the empty set is linearly independent. What about all of ?
- Problem 11
Show that if is linearly independent then so are all of its proper subsets: , , , ,, , and . Is that "only if" also?
- Problem 12
- Show that this
- Show that
- Assume that is a subset of a vector space and that is in , so that is a linear combination of vectors from . Prove that if is linearly independent then a linear combination of vectors from adding to is unique (that is, unique up to reordering and adding or taking away terms of the form ). Thus as a spanning set is minimal in this strong sense: each vector in is "hit" a minimum number of times— only once.
- Prove that it can happen when is not linearly independent that distinct linear combinations sum to the same vector.
- Problem 13
Prove that a polynomial gives rise to the zero function if and only if it is the zero polynomial. (Comment. This question is not a Linear Algebra matter, but we often use the result. A polynomial gives rise to a function in the obvious way: .)
- Problem 14
Return to Section 1.2 and redefine point, line, plane, and other linear surfaces to avoid degenerate cases.
- Problem 15
- Show that any set of four vectors in is linearly dependent.
- Is this true for any set of five? Any set of three?
- What is the most number of elements that a linearly independent subset of can have?
- This exercise is recommended for all readers.
- Problem 16
Is there a set of four vectors in , any three of which form a linearly independent set?
- Problem 17
Must every linearly dependent set have a subset that is dependent and a subset that is independent?
- Problem 18
In , what is the biggest linearly independent set you can find? The smallest? The biggest linearly dependent set? The smallest? ("Biggest" and "smallest" mean that there are no supersets or subsets with the same property.)
- This exercise is recommended for all readers.
- Problem 19
Linear independence and linear dependence are properties of sets. We can thus naturally ask how those properties act with respect to the familiar elementary set relations and operations. In this body of this subsection we have covered the subset and superset relations. We can also consider the operations of intersection, complementation, and union.
- How does linear independence relate to intersection: can an intersection of linearly independent sets be independent? Must it be?
- How does linear independence relate to complementation?
- Show that the union of two linearly independent sets need not be linearly independent.
- Characterize when the union of two linearly independent sets is linearly independent, in terms of the intersection of the span of each.
- This exercise is recommended for all readers.
- Problem 20
For Theorem 1.12,
- fill in the induction for the proof;
- give an alternate proof that starts with the empty set and builds a sequence of linearly independent subsets of the given finite set until one appears with the same span as the given set.
- Problem 21
With a little calculation we can get formulas to determine whether or not a set of vectors is linearly independent.
- Show that this subset of
- Show that this subset of
- When is this subset of
- This is an opinion question: for a set of four vectors from , must there be a formula involving the sixteen entries that determines independence of the set? (You needn't produce such a formula, just decide if one exists.)
- This exercise is recommended for all readers.
- Problem 22
- Prove that a set of two perpendicular nonzero vectors from is linearly independent when .
- What if ? ?
- Generalize to more than two vectors.
- Problem 23
Consider the set of functions from the open interval to .
- Show that this set is a vector space under the usual operations.
- Recall the formula for the sum of an infinite geometric series: for all . Why does this not express a dependence inside of the set (in the vector space that we are considering)? (Hint. Review the definition of linear combination.)
- Show that the set in the prior item is linearly independent.
This shows that some vector spaces exist with linearly independent subsets that are infinite.
- Problem 24
Show that, where is a subspace of , if a subset of is linearly independent in then is also linearly independent in . Is that "only if"?
Section III - Basis and Dimension
The prior section ends with the statement that a spanning set is minimal when it is linearly independent and a linearly independent set is maximal when it spans the space. So the notions of minimal spanning set and maximal independent set coincide. In this section we will name this idea and study its properties.
1 - Basis
- Definition 1.1
A basis for a vector space is a sequence of vectors that form a set that is linearly independent and that spans the space.
We denote a basis with angle brackets to signify that this collection is a sequence[2] — the order of the elements is significant. (The requirement that a basis be ordered will be needed, for instance, in Definition 1.13.)
- Example 1.2
This is a basis for .
It is linearly independent
and it spans .
- Example 1.3
This basis for
differs from the prior one because the vectors are in a different order. The verification that it is a basis is just as in the prior example.
- Example 1.4
The space has many bases. Another one is this.
The verification is easy.
- Definition 1.5
For any ,
is the standard (or natural) basis. We denote these vectors by .
(Calculus books refer to 's standard basis vectors and instead of and , and they refer to 's standard basis vectors , , and instead of , , and .) Note that the symbol "" means something different in a discussion of than it means in a discussion of .
- Example 1.6
Consider the space of functions of the real variable .
Another basis is . Verification that these two are bases is Problem 7.
- Example 1.7
A natural for the vector space of cubic polynomials is . Two other bases for this space are and . Checking that these are linearly independent and span the space is easy.
- Example 1.8
The trivial space has only one basis, the empty one .
- Example 1.9
The space of finite-degree polynomials has a basis with infinitely many elements .
- Example 1.10
We have seen bases before. In the first chapter we described the solution set of homogeneous systems such as this one
by parametrizing.
That is, we described the vector space of solutions as the span of a two-element set. We can easily check that this two-vector set is also linearly independent. Thus the solution set is a subspace of with a two-element basis.
- Example 1.11
Parameterization helps find bases for other vector spaces, not just for solution sets of homogeneous systems. To find a basis for this subspace of
we rewrite the condition as .
Thus, this is a good candidate for a basis.
The above work shows that it spans the space. To show that it is linearly independent is routine.
Consider again Example 1.2. It involves two verifications.
In the first, to check that the set is linearly independent we looked at linear combinations of the set's members that total to the zero vector . The resulting calculation shows that such a combination is unique, that must be and must be .
The second verification, that the set spans the space, looks at linear combinations that total to any member of the space . In Example 1.2 we noted only that the resulting calculation shows that such a combination exists, that for each there is a . However, in fact the calculation also shows that the combination is unique: must be and must be .
That is, the first calculation is a special case of the second. The next result says that this holds in general for a spanning set: the combination totaling to the zero vector is unique if and only if the combination totaling to any vector is unique.
- Theorem 1.12
In any vector space, a subset is a basis if and only if each vector in the space can be expressed as a linear combination of elements of the subset in a unique way.
We consider combinations to be the same if they differ only in the order of summands or in the addition or deletion of terms of the form "".
- Proof
By definition, a sequence is a basis if and only if its vectors form both a spanning set and a linearly independent set. A subset is a spanning set if and only if each vector in the space is a linear combination of elements of that subset in at least one way.
Thus, to finish we need only show that a subset is linearly independent if and only if every vector in the space is a linear combination of elements from the subset in at most one way. Consider two expressions of a vector as a linear combination of the members of the basis. We can rearrange the two sums, and if necessary add some terms, so that the two sums combine the same 's in the same order: and . Now
holds if and only if
holds, and so asserting that each coefficient in the lower equation is zero is the same thing as asserting that for each .
- Definition 1.13
In a vector space with basis the representation of with respect to is the column vector of the coefficients used to express as a linear combination of the basis vectors:
where and . The 's are the coordinates of with respect to
We will later do representations in contexts that involve more than one basis. To help with the bookkeeping, we shall often attach a subscript to the column vector.
- Example 1.14
In , with respect to the basis , the representation of is
(note that the coordinates are scalars, not vectors). With respect to a different basis , the representation
is different.
- Remark 1.15
This use of column notation and the term "coordinates" has both a down side and an up side.
The down side is that representations look like vectors from , which can be confusing when the vector space we are working with is , especially since we sometimes omit the subscript base. We must then infer the intent from the context. For example, the phrase "in , where " refers to the plane vector that, when in canonical position, ends at . To find the coordinates of that vector with respect to the basis
we solve
to get that and . Then we have this.
Here, although we've ommited the subscript from the column, the fact that the right side is a representation is clear from the context.
The up side of the notation and the term "coordinates" is that they generalize the use that we are familiar with:~in and with respect to the standard basis , the vector starting at the origin and ending at has this representation.
Our main use of representations will come in the third chapter. The definition appears here because the fact that every vector is a linear combination of basis vectors in a unique way is a crucial property of bases, and also to help make two points. First, we fix an order for the elements of a basis so that coordinates can be stated in that order. Second, for calculation of coordinates, among other things, we shall restrict our attention to spaces with bases having only finitely many elements. We will see that in the next subsection.
Exercises
- This exercise is recommended for all readers.
- Problem 1
Decide if each is a basis for .
- This exercise is recommended for all readers.
- Problem 2
Represent the vector with respect to the basis.
- ,
- ,
- ,
- Problem 3
Find a basis for , the space of all quadratic polynomials. Must any such basis contain a polynomial of each degree:~degree zero, degree one, and degree two?
- Problem 4
Find a basis for the solution set of this system.
- This exercise is recommended for all readers.
- Problem 5
Find a basis for , the space of matrices.
- This exercise is recommended for all readers.
- Problem 6
Find a basis for each.
- The subspace of
- The space of three-wide row vectors whose first and second components add to zero
- This subspace of the matrices
- Problem 7
Check Example 1.6.
- This exercise is recommended for all readers.
- Problem 8
Find the span of each set and then find a basis for that span.
- in
- in
- This exercise is recommended for all readers.
- Problem 9
Find a basis for each of these subspaces of the space of cubic polynomials.
- The subspace of cubic polynomials such that
- The subspace of polynomials such that and
- The subspace of polynomials such that , , and~
- The space of polynomials such that , , , and~
- Problem 10
We've seen that it is possible for a basis to remain a basis when it is reordered. Must it always remain a basis?
- Problem 11
Can a basis contain a zero vector?
- This exercise is recommended for all readers.
- Problem 12
Let be a basis for a vector space.
- Show that is a basis when . What happens when at least one is ?
- Prove that is a basis where .
- Problem 13
Find one vector that will make each into a basis for the space.
- in
- in
- in
- This exercise is recommended for all readers.
- Problem 14
Where is a basis, show that in this equation
each of the 's is zero. Generalize.
- Problem 15
A basis contains some of the vectors from a vector space; can it contain them all?
- Problem 16
Theorem 1.12 shows that, with respect to a basis, every linear combination is unique. If a subset is not a basis, can linear combinations be not unique? If so, must they be?
- This exercise is recommended for all readers.
- Problem 17
A square matrix is symmetric if for all indices and , entry equals entry .
- Find a basis for the vector space of symmetric matrices.
- Find a basis for the space of symmetric matrices.
- Find a basis for the space of symmetric matrices.
- This exercise is recommended for all readers.
- Problem 18
We can show that every basis for contains the same number of vectors.
- Show that no linearly independent subset of contains more than three vectors.
- Show that no spanning subset of contains fewer than three vectors. (Hint. Recall how to calculate the span of a set and show that this method, when applied to two vectors, cannot yield all of .)
- Problem 19
One of the exercises in the Subspaces subsection shows that the set
is a vector space under these operations.
Find a basis.
Footnotes
- ↑ More information on equivalence of statements is in the appendix.
- ↑ More information on sequences is in the appendix.
2 - Dimension
In the prior subsection we defined the basis of a vector space, and we saw that a space can have many different bases. For example, following the definition of a basis, we saw three different bases for . So we cannot talk about "the" basis for a vector space. True, some vector spaces have bases that strike us as more natural than others, for instance, 's basis or 's basis or 's basis . But, for example in the space , no particular basis leaps out at us as the most natural one. We cannot, in general, associate with a space any single basis that best describes that space.
We can, however, find something about the bases that is uniquely associated with the space. This subsection shows that any two bases for a space have the same number of elements. So, with each space we can associate a number, the number of vectors in any of its bases.
This brings us back to when we considered the two things that could be meant by the term "minimal spanning set". At that point we defined "minimal" as linearly independent, but we noted that another reasonable interpretation of the term is that a spanning set is "minimal" when it has the fewest number of elements of any set with the same span. At the end of this subsection, after we have shown that all bases have the same number of elements, then we will have shown that the two senses of "minimal" are equivalent.
Before we start, we first limit our attention to spaces where at least one basis has only finitely many members.
- Definition 2.1
A vector space is finite-dimensional if it has a basis with only finitely many vectors.
(One reason for sticking to finite-dimensional spaces is so that the representation of a vector with respect to a basis is a finitely-tall vector, and so can be easily written.) From now on we study only finite-dimensional vector spaces. We shall take the term "vector space" to mean "finite-dimensional vector space". Other spaces are interesting and important, but they lie outside of our scope.
To prove the main theorem we shall use a technical result.
- Lemma 2.2 (Exchange Lemma)
Assume that is a basis for a vector space, and that for the vector the relationship has . Then exchanging for yields another basis for the space.
- Proof
Call the outcome of the exchange .
We first show that is linearly independent. Any relationship among the members of , after substitution for ,
gives a linear relationship among the members of . The basis is linearly independent, so the coefficient of is zero. Because is assumed to be nonzero, . Using this in equation above gives that all of the other 's are also zero. Therefore is linearly independent.
We finish by showing that has the same span as . Half of this argument, that , is easy; any member of can be written , which is a linear combination of linear combinations of members of , and hence is in . For the half of the argument, recall that when with , then the equation can be rearranged to . Now, consider any member of , substitute for its expression as a linear combination of the members of , and recognize (as in the first half of this argument) that the result is a linear combination of linear combinations, of members of , and hence is in .
- Theorem 2.3
In any finite-dimensional vector space, all of the bases have the same number of elements.
- Proof
Fix a vector space with at least one finite basis. Choose, from among all of this space's bases, one of minimal size. We will show that any other basis also has the same number of members, . Because has minimal size, has no fewer than vectors. We will argue that it cannot have more than vectors.
The basis spans the space and is in the space, so is a nontrivial linear combination of elements of . By the Exchange Lemma, can be swapped for a vector from , resulting in a basis , where one element is and all of the other elements are 's.
The prior paragraph forms the basis step for an induction argument. The inductive step starts with a basis (for ) containing members of and members of . We know that has at least members so there is a . Represent it as a linear combination of elements of . The key point: in that representation, at least one of the nonzero scalars must be associated with a or else that representation would be a nontrivial linear relationship among elements of the linearly independent set . Exchange for to get a new basis with one more and one fewer than the previous basis .
Repeat the inductive step until no 's remain, so that contains . Now, cannot have more than these vectors because any that remains would be in the span of (since it is a basis) and hence would be a linear combination of the other 's, contradicting that is linearly independent.
- Definition 2.4
The dimension of a vector space is the number of vectors in any of its bases.
- Example 2.5
Any basis for has vectors since the standard basis has vectors. Thus, this definition generalizes the most familiar use of term, that is -dimensional.
- Example 2.6
The space of polynomials of degree at most has dimension . We can show this by exhibiting any basis— comes to mind— and counting its members.
- Example 2.7
A trivial space is zero-dimensional since its basis is empty.
Again, although we sometimes say "finite-dimensional" as a reminder, in the rest of this book all vector spaces are assumed to be finite-dimensional. An instance of this is that in the next result the word "space" should be taken to mean "finite-dimensional vector space".
- Corollary 2.8
No linearly independent set can have a size greater than the dimension of the enclosing space.
- Proof
Inspection of the above proof shows that it never uses that spans the space, only that is linearly independent.
- Example 2.9
Recall the subspace diagram from the prior section showing the subspaces of . Each subspace shown is described with a minimal spanning set, for which we now have the term "basis". The whole space has a basis with three members, the plane subspaces have bases with two members, the line subspaces have bases with one member, and the trivial subspace has a basis with zero members. When we saw that diagram we could not show that these are the only subspaces that this space has. We can show it now. The prior corollary proves that the only subspaces of are either three-, two-, one-, or zero-dimensional. Therefore, the diagram indicates all of the subspaces. There are no subspaces somehow, say, between lines and planes.
- Corollary 2.10
Any linearly independent set can be expanded to make a basis.
- Proof
If a linearly independent set is not already a basis then it must not span the space. Adding to it a vector that is not in the span preserves linear independence. Keep adding, until the resulting set does span the space, which the prior corollary shows will happen after only a finite number of steps.
- Corollary 2.11
Any spanning set can be shrunk to a basis.
- Proof
Call the spanning set . If is empty then it is already a basis (the space must be a trivial space). If then it can be shrunk to the empty basis, thereby making it linearly independent, without changing its span.
Otherwise, contains a vector with and we can form a basis . If then we are done.
If not then there is a such that . Let ; if then we are done.
We can repeat this process until the spans are equal, which must happen in at most finitely many steps.
- Corollary 2.12
In an -dimensional space, a set of vectors is linearly independent if and only if it spans the space.
- Proof
First we will show that a subset with vectors is linearly independent if and only if it is a basis. "If" is trivially true— bases are linearly independent. "Only if" holds because a linearly independent set can be expanded to a basis, but a basis has elements, so this expansion is actually the set that we began with.
To finish, we will show that any subset with vectors spans the space if and only if it is a basis. Again, "if" is trivial. "Only if" holds because any spanning set can be shrunk to a basis, but a basis has elements and so this shrunken set is just the one we started with.
The main result of this subsection, that all of the bases in a finite-dimensional vector space have the same number of elements, is the single most important result in this book because, as Example 2.9 shows, it describes what vector spaces and subspaces there can be. We will see more in the next chapter.
- Remark 2.13
The case of infinite-dimensional vector spaces is somewhat controversial. The statement "any infinite-dimensional vector space has a basis" is known to be equivalent to a statement called the Axiom of Choice (see (Blass 1984) .) Mathematicians differ philosophically on whether to accept or reject this statement as an axiom on which to base mathematics (although, the great majority seem to accept it). Consequently the question about infinite-dimensional vector spaces is still somewhat up in the air. (A discussion of the Axiom of Choice can be found in the Frequently Asked Questions list for the Usenet group sci.math
. Another accessible reference is (Rucker 1982) .
Exercises
Assume that all spaces are finite-dimensional unless otherwise stated.
- This exercise is recommended for all readers.
- Problem 1
Find a basis for, and the dimension of, .
- Problem 2
Find a basis for, and the dimension of, the solution set of this system.
- This exercise is recommended for all readers.
- Problem 3
Find a basis for, and the dimension of, , the vector space of matrices.
- Problem 4
Find the dimension of the vector space of matrices
subject to each condition.
- and
- , , and
- This exercise is recommended for all readers.
- Problem 5
Find the dimension of each.
- The space of cubic polynomials such that
- The space of cubic polynomials such that and
- The space of cubic polynomials such that , , and
- The space of cubic polynomials such that , , , and
- Problem 6
What is the dimension of the span of the set ? This span is a subspace of the space of all real-valued functions of one real variable.
- Problem 7
Find the dimension of , the vector space of -tuples of complex numbers.
- Problem 8
What is the dimension of the vector space of matrices?
- This exercise is recommended for all readers.
- Problem 9
Show that this is a basis for .
(The results of this subsection can be used to simplify this job.)
- This exercise is recommended for all readers.
- Problem 11
- Where is a set, the functions form a vector space under the natural operations: the sum is the function given by and the scalar product is given by . What is the dimension of the space resulting for each domain?
- Problem 12
(See Problem 11.) Prove that this is an infinite-dimensional space: the set of all functions under the natural operations.
- Problem 13
(See Problem 11.) What is the dimension of the vector space of functions , under the natural operations, where the domain is the empty set?
- Problem 14
Show that any set of four vectors in is linearly dependent.
- Problem 15
Show that the set is a basis if and only if there is no plane through the origin containing all three vectors.
- Problem 16
- Prove that any subspace of a finite dimensional space has a basis.
- Prove that any subspace of a finite dimensional space is finite dimensional.
- Problem 17
Where is the finiteness of used in Theorem 2.3?
- This exercise is recommended for all readers.
- Problem 18
Prove that if and are both three-dimensional subspaces of then is non-trivial. Generalize.
- Problem 19
Because a basis for a space is a subset of that space, we are naturally led to how the property "is a basis" interacts with set operations.
- Consider first how bases might be related by "subset". Assume that are subspaces of some vector space and that . Can there exist bases for and for such that ? Must such bases exist? For any basis for , must there be a basis for such that ? For any basis for , must there be a basis for such that ? For any bases for and , must be a subset of ?
- Is the intersection of bases a basis? For what space?
- Is the union of bases a basis? For what space?
- What about complement?
(Hint. Test any conjectures against some subspaces of .)
- This exercise is recommended for all readers.
- Problem 20
Consider how "dimension" interacts with "subset". Assume and are both subspaces of some vector space, and that .
- Prove that .
- Prove that equality of dimension holds if and only if .
- Show that the prior item does not hold if they are infinite-dimensional.
- ? Problem 21
For any vector in and any permutation of the numbers , , ..., (that is, is a rearrangement of those numbers into a new order), define to be the vector whose components are , , ..., and (where is the first number in the rearrangement, etc.). Now fix and let be the span of . What are the possibilities for the dimension of ? (Gilbert, Krusemeyer & Larson 1993, Problem 47)
3 - Vector Spaces and Linear Systems
We will now reconsider linear systems and Gauss' method, aided by the tools and terms of this chapter. We will make three points.
For the first point, recall the first chapter's Linear Combination Lemma and its corollary: if two matrices are related by row operations then each row of is a linear combination of the rows of . That is, Gauss' method works by taking linear combinations of rows. Therefore, the right setting in which to study row operations in general, and Gauss' method in particular, is the following vector space.
- Definition 3.1
The row space of a matrix is the span of the set of its rows. The row rank is the dimension of the row space, the number of linearly independent rows.
- Example 3.2
If
then is this subspace of the space of two-component row vectors.
The linear dependence of the second on the first is obvious and so we can simplify this description to .
- Lemma 3.3
If the matrices and are related by a row operation
(for and ) then their row spaces are equal. Hence, row-equivalent matrices have the same row space, and hence also, the same row rank.
- Proof
By the Linear Combination Lemma's corollary, each row of is in the row space of . Further, because a member of the set is a linear combination of the rows of , which means it is a combination of a combination of the rows of , and hence, by the Linear Combination Lemma, is also a member of .
For the other containment, recall that row operations are reversible: if and only if . With that, also follows from the prior paragraph, and so the two sets are equal.
Thus, row operations leave the row space unchanged. But of course, Gauss' method performs the row operations systematically, with a specific goal in mind, echelon form.
- Lemma 3.4
The nonzero rows of an echelon form matrix make up a linearly independent set.
- Proof
A result in the first chapter, Lemma One.III.2.5, states that in an echelon form matrix, no nonzero row is a linear combination of the other rows. This is a restatement of that result into new terminology.
Thus, in the language of this chapter, Gaussian reduction works by eliminating linear dependencies among rows, leaving the span unchanged, until no nontrivial linear relationships remain (among the nonzero rows). That is, Gauss' method produces a basis for the row space.
- Example 3.5
From any matrix, we can produce a basis for the row space by performing Gauss' method and taking the nonzero rows of the resulting echelon form matrix. For instance,
produces the basis for the row space. This is a basis for the row space of both the starting and ending matrices, since the two row spaces are equal.
Using this technique, we can also find bases for spans not directly involving row vectors.
- Definition 3.6
The column space of a matrix is the span of the set of its columns. The column rank is the dimension of the column space, the number of linearly independent columns.
Our interest in column spaces stems from our study of linear systems. An example is that this system
has a solution if and only if the vector of 's is a linear combination of the other column vectors,
meaning that the vector of 's is in the column space of the matrix of coefficients.
- Example 3.7
Given this matrix,
to get a basis for the column space, temporarily turn the columns into rows and reduce.
Now turn the rows back to columns.
The result is a basis for the column space of the given matrix.
- Definition 3.8
The transpose of a matrix is the result of interchanging the rows and columns of that matrix. That is, column of the matrix is row of , and vice versa.
So the instructions for the prior example are "transpose, reduce, and transpose back".
We can even, at the price of tolerating the as-yet-vague idea of vector spaces being "the same", use Gauss' method to find bases for spans in other types of vector spaces.
- Example 3.9
To get a basis for the span of in the space , think of these three polynomials as "the same" as the row vectors , , and , apply Gauss' method
and translate back to get the basis . (As mentioned earlier, we will make the phrase "the same" precise at the start of the next chapter.)
Thus, our first point in this subsection is that the tools of this chapter give us a more conceptual understanding of Gaussian reduction.
For the second point of this subsection, consider the effect on the column space of this row reduction.
The column space of the left-hand matrix contains vectors with a second component that is nonzero. But the column space of the right-hand matrix is different because it contains only vectors whose second component is zero. It is this knowledge that row operations can change the column space that makes next result surprising.
- Lemma 3.10
Row operations do not change the column rank.
- Proof
Restated, if reduces to then the column rank of equals the column rank of .
We will be done if we can show that row operations do not affect linear relationships among columns (e.g., if the fifth column is twice the second plus the fourth before a row operation then that relationship still holds afterwards), because the column rank is just the size of the largest set of unrelated columns. But this is exactly the first theorem of this book: in a relationship among columns,
row operations leave unchanged the set of solutions .
Another way, besides the prior result, to state that Gauss' method has something to say about the column space as well as about the row space is to consider again Gauss-Jordan reduction. Recall that it ends with the reduced echelon form of a matrix, as here.
Consider the row space and the column space of this result. Our first point made above says that a basis for the row space is easy to get: simply collect together all of the rows with leading entries. However, because this is a reduced echelon form matrix, a basis for the column space is just as easy: take the columns containing the leading entries, that is, . (Linear independence is obvious. The other columns are in the span of this set, since they all have a third component of zero.) Thus, for a reduced echelon form matrix, bases for the row and column spaces can be found in essentially the same way— by taking the parts of the matrix, the rows or columns, containing the leading entries.
- Theorem 3.11
The row rank and column rank of a matrix are equal.
- Proof
First bring the matrix to reduced echelon form. At that point, the row rank equals the number of leading entries since that equals the number of nonzero rows. Also at that point, the number of leading entries equals the column rank because the set of columns containing leading entries consists of some of the 's from a standard basis, and that set is linearly independent and spans the set of columns. Hence, in the reduced echelon form matrix, the row rank equals the column rank, because each equals the number of leading entries.
But Lemma 3.3 and Lemma 3.10 show that the row rank and column rank are not changed by using row operations to get to reduced echelon form. Thus the row rank and the column rank of the original matrix are also equal.
- Definition 3.12
The rank of a matrix is its row rank or column rank.
So our second point in this subsection is that the column space and row space of a matrix have the same dimension. Our third and final point is that the concepts that we've seen arising naturally in the study of vector spaces are exactly the ones that we have studied with linear systems.
- Theorem 3.13
For linear systems with unknowns and with matrix of coefficients , the statements
- the rank of is
- the space of solutions of the associated homogeneous system has dimension
are equivalent.
So if the system has at least one particular solution then for the set of solutions, the number of parameters equals , the number of variables minus the rank of the matrix of coefficients.
- Proof
The rank of is if and only if Gaussian reduction on ends with nonzero rows. That's true if and only if echelon form matrices row equivalent to have -many leading variables. That in turn holds if and only if there are free variables.
- Remark 3.14
- (Munkres 1964)
Sometimes that result is mistakenly remembered to say that the general solution of an unknown system of equations uses parameters. The number of equations is not the relevant figure, rather, what matters is the number of independent equations (the number of equations in a maximal independent set). Where there are independent equations, the general solution involves parameters.
- Corollary 3.15
Where the matrix is , the statements
- the rank of is
- is nonsingular
- the rows of form a linearly independent set
- the columns of form a linearly independent set
- any linear system whose matrix of coefficients is has one and only one solution
are equivalent.
- Proof
Clearly . The last, , holds because a set of column vectors that have components is linearly independent if and only if it is a basis for , but the system
has a unique solution for all choices of if and only if the vectors of 's form a basis.
Exercises
- Problem 1
Transpose each.
- This exercise is recommended for all readers.
- Problem 2
Decide if the vector is in the row space of the matrix.
- ,
- ,
- This exercise is recommended for all readers.
- Problem 3
Decide if the vector is in the column space.
- ,
- ,
- This exercise is recommended for all readers.
- Problem 4
Find a basis for the row space of this matrix.
- This exercise is recommended for all readers.
- Problem 5
Find the rank of each matrix.
- This exercise is recommended for all readers.
- Problem 6
Find a basis for the span of each set.
- Problem 7
Which matrices have rank zero? Rank one?
- This exercise is recommended for all readers.
- Problem 8
Given , what choice of will cause this matrix to have the rank of one?
- Problem 9
Find the column rank of this matrix.
- Problem 10
Show that a linear system with at least one solution has at most one solution if and only if the matrix of coefficients has rank equal to the number of its columns.
- This exercise is recommended for all readers.
- Problem 11
If a matrix is , which set must be dependent, its set of rows or its set of columns?
- Problem 12
Give an example to show that, despite that they have the same dimension, the row space and column space of a matrix need not be equal. Are they ever equal?
- Problem 13
Show that the set does not have the same span as . What, by the way, is the vector space?
- This exercise is recommended for all readers.
- Problem 14
Show that this set of column vectors
is a subspace of . Find a basis.
- Problem 15
Show that the transpose operation is linear:
for and .
- This exercise is recommended for all readers.
- Problem 16
In this subsection we have shown that Gaussian reduction finds a basis for the row space.
- Show that this basis is not unique— different reductions may yield different bases.
- Produce matrices with equal row spaces but unequal numbers of rows.
- Prove that two matrices have equal row spaces if and only if after Gauss-Jordan reduction they have the same nonzero rows.
- Problem 17
Why is there not a problem with Remark 3.14 in the case that is bigger than ?
- Problem 18
Show that the row rank of an matrix is at most . Is there a better bound?
- This exercise is recommended for all readers.
- Problem 19
Show that the rank of a matrix equals the rank of its transpose.
- Problem 20
True or false: the column space of a matrix equals the row space of its transpose.
- This exercise is recommended for all readers.
- Problem 21
We have seen that a row operation may change the column space. Must it?
- Problem 22
Prove that a linear system has a solution if and only if that system's matrix of coefficients has the same rank as its augmented matrix.
- Problem 23
An matrix has full row rank if its row rank is , and it has full column rank if its column rank is .
- Show that a matrix can have both full row rank and full column rank only if it is square.
- Prove that the linear system with matrix of coefficients has a solution for any , ..., 's on the right side if and only if has full row rank.
- Prove that a homogeneous system has a unique solution if and only if its matrix of coefficients has full column rank.
- Prove that the statement "if a system with matrix of coefficients has any solution then it has a unique solution" holds if and only if has full column rank.
- Problem 24
How would the conclusion of Lemma 3.3 change if Gauss' method is changed to allow multiplying a row by zero?
- This exercise is recommended for all readers.
- Problem 25
What is the relationship between and ? Between and ? What, if any, is the relationship between , , and ?
4 - Combining Subspaces
This subsection is optional. It is required only for the last sections of Chapter Three and Chapter Five and for occasional exercises, and can be passed over without loss of continuity.
This chapter opened with the definition of a vector space, and the middle consisted of a first analysis of the idea. This subsection closes the chapter by finishing the analysis, in the sense that "analysis" means "method of determining the ... essential features of something by separating it into parts" (Halsey 1979) .
A common way to understand things is to see how they can be built from component parts. For instance, we think of as put together, in some way, from the -axis, the -axis, and -axis. In this subsection we will make this precise;we will describe how to decompose a vector space into a combination of some of its subspaces. In developing this idea of subspace combination, we will keep the example in mind as a benchmark model.
Subspaces are subsets and sets combine via union. But taking the combination operation for subspaces to be the simple union operation isn't what we want. For one thing, the union of the -axis, the -axis, and -axis is not all of , so the benchmark model would be left out. Besides, union is all wrong for this reason: a union of subspaces need not be a subspace (it need not be closed; for instance, this vector
is in none of the three axes and hence is not in the union). In addition to the members of the subspaces, we must at least also include all of the linear combinations.
- Definition 4.1
Where are subspaces of a vector space, their sum is the span of their union .
(The notation, writing the "" between sets in addition to using it between vectors, fits with the practice of using this symbol for any natural accumulation operation.)
- Example 4.2
The model fits with this operation. Any vector can be written as a linear combination where is a member of the -axis, etc., in this way
and so .
- Example 4.3
A sum of subspaces can be less than the entire space. Inside of , let be the subspace of linear polynomials and let be the subspace of purely-cubic polynomials . Then is not all of . Instead, it is the subspace .
- Example 4.4
A space can be described as a combination of subspaces in more than one way. Besides the decomposition , we can also write . To check this, note that any can be written as a linear combination of a member of the -plane and a member of the -plane; here are two such combinations.
The above definition gives one way in which a space can be thought of as a combination of some of its parts. However, the prior example shows that there is at least one interesting property of our benchmark model that is not captured by the definition of the sum of subspaces. In the familiar decomposition of , we often speak of a vector's "part" or "part" or "part". That is, in this model, each vector has a unique decomposition into parts that come from the parts making up the whole space. But in the decomposition used in Example 4.4, we cannot refer to the "part" of a vector— these three sums
all describe the vector as comprised of something from the first plane plus something from the second plane, but the "part" is different in each.
That is, when we consider how is put together from the three axes "in some way", we might mean "in such a way that every vector has at least one decomposition", and that leads to the definition above. But if we take it to mean "in such a way that every vector has one and only one decomposition" then we need another condition on combinations. To see what this condition is, recall that vectors are uniquely represented in terms of a basis. We can use this to break a space into a sum of subspaces such that any vector in the space breaks uniquely into a sum of members of those subspaces.
- Example 4.5
The benchmark is with its standard basis . The subspace with the basis is the -axis. The subspace with the basis is the -axis. The subspace with the basis is the -axis. The fact that any member of is expressible as a sum of vectors from these subspaces
is a reflection of the fact that spans the space— this equation
has a solution for any . And, the fact that each such expression is unique reflects that fact that is linearly independent— any equation like the one above has a unique solution.
- Example 4.6
We don't have to take the basis vectors one at a time, the same idea works if we conglomerate them into larger sequences. Consider again the space and the vectors from the standard basis . The subspace with the basis is the -plane. The subspace with the basis is the -axis. As in the prior example, the fact that any member of the space is a sum of members of the two subspaces in one and only one way
is a reflection of the fact that these vectors form a basis— this system
has one and only one solution for any .
These examples illustrate a natural way to decompose a space into a sum of subspaces in such a way that each vector decomposes uniquely into a sum of vectors from the parts. The next result says that this way is the only way.
- Definition 4.7
The concatenation of the sequences , ..., is their adjoinment.
- Lemma 4.8
Let be a vector space that is the sum of some of its subspaces . Let , ..., be any bases for these subspaces. Then the following are equivalent.
- For every , the expression (with ) is unique.
- The concatenation is a basis for .
- The nonzero members of (with ) form a linearly independent set— among nonzero vectors from different 's, every linear relationship is trivial.
- Proof
We will show that , that , and finally that . For these arguments, observe that we can pass from a combination of 's to a combination of 's
and vice versa.
For , assume that all decompositions are unique. We will show that spans the space and is linearly independent. It spans the space because the assumption that means that every can be expressed as , which translates by equation() to an expression of as a linear combination of the 's from the concatenation. For linear independence, consider this linear relationship.
Regroup as in () (that is, take , ..., to be and move from bottom to top) to get the decomposition . Because of the assumption that decompositions are unique, and because the zero vector obviously has the decomposition , we now have that each is the zero vector. This means that . Thus, since each