




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































GABRIEL NAGY
Mathematics Department, Michigan State University, East Lansing, MI, 48824.
JULY 15, 2012
Abstract. These are the lecture notes for the course MTH 415, Applied Linear Algebra, a one semester class taught in 2009-2012. These notes present a basic introduction to linear algebra with emphasis on few applications. Chapter 1 introduces systems of linear equations, the Gauss-Jordan method to find solutions of these systems which transforms the augmented matrix associated with a linear system into reduced echelon form, where the solutions of the linear system are simple to obtain. We end the Chapter with two ap- plications of linear systems: First, to find approximate solutions to differential equations using the method of finite differences; second, to solve linear systems using floating-point numbers, as happens in a computer. Chapter 2 reviews matrix algebra, that is, we in- troduce the linear combination of matrices, the multiplication of appropriate matrices, and the inverse of a square matrix. We end the Chapter with the LU-factorization of a matrix. Chapter 3 reviews the determinant of a square matrix, the relation between a non-zero determinant and the existence of the inverse matrix, a formula for the inverse matrix using the matrix of cofactors, and the Cramer rule for the formula of the solu- tion of a linear system with an invertible matrix of coefficients. The advanced part of the course really starts in Chapter 4 with the definition of vector spaces, subspaces, the linear dependence or independence of a set of vectors, bases and dimensions of vector spaces. Both finite and infinite dimensional vector spaces are presented, however finite dimensional vector spaces are the main interest in this notes. Chapter 5 presents linear transformations between vector spaces, the components of a linear transformation in a basis, and the formulas for the change of basis for both vector components and transfor- mation components. Chapter 6 introduces a new structure on a vector space, called an inner product. The definition of an inner product is based on the properties of the dot product in Rn. We study the notion of orthogonal vectors, orthogonal projections, best approximations of a vector on a subspace, and the Gram-Schmidt orthonormalization procedure. The central application of these ideas is the method of least-squares to find approximate solutions to inconsistent linear systems. One application is to find the best polynomial fit to a curve on a plane. Chapter 8 introduces the notion of a normed space, which is a vector space with a norm function which does not necessarily comes from an inner product. We study the main properties of the p-norms on Rn^ or Cn, which are useful norms in functional analysis. We briefly discuss induced operator norms. The last Section is an application of matrix norms. It discusses the condition number of a matrix and how to use this information to determine ill-conditioned linear systems. Finally, Chapter 9 introduces the notion of eigenvalue and eigenvector of a linear operator. We study diagonalizable operators, which are operators with diagonal matrix components in a basis of its eigenvectors. We also study functions of diagonalizable operators, with the exponential function as a main example. We also discuss how to apply these ideas to find solution of linear systems of ordinary differential equations.
Date: July 15, 2012, [email protected].
Overview Linear algebra is a collection of ideas involving algebraic systems of linear equations, vectors and vector spaces, and linear transformations between vector spaces. Algebraic equations are called a system when there is more than one equation, and they are called linear when the unknown appears as a multiplicative factor with power zero or one. An example of a linear system of two equations in two unknowns is given in Eqs. (1.3)-(1.4) below. Systems of linear equations are the main subject of Chapter 1. Examples of vectors are oriented segments on a line, plane, or space. An oriented segment is an ordered pair of points in these sets. Such ordered pair can be drawn as an arrow that starts on the first point and ends on the second point. Fix a preferred point in the line, plane or space, called the origin point, and then there exists a one-to-one correspondence between points in these sets and arrows that start at the origin point. The set of oriented segments with common origin in a line, plane, and space are called R, R^2 and R^3 , respectively. A sketch of vectors in these sets can be seen in Fig. 1. Two operations are defined on oriented segments with common origin point: An oriented segment can be stretched or compressed; and two oriented segments with the same origin point can be added using the parallelogram law. An addition of several stretched or compressed vectors is called a linear combination. The set of all oriented segments with common origin point together with this operation of linear combination is the essential structure called vector space. The origin of the word “space” in the term “vector space” originates precisely in these examples, which were associated with the physical space.
(^0 0 )
Figure 1. Example of vectors in the line, plane, and space, respectively.
Linear transformations are a particular type of functions between vector spaces that preserve the operation of linear combination. An example of a linear transformation is a 2 × 2 matrix A =
3 4
together with a matrix-vector product that specifies how this matrix transforms a vector on the plane into another vector on the plane. The result is thus a function A : R^2 → R^2. These notes try to be an elementary introduction to linear algebra with few applications.
Notation and conventions. We use the notation F ∈ {R, C} to mean that F = R or F = C. Vectors will be denoted by boldface letters, like u and v. The exception are a column vectors in Fn^ which are denoted in sanserif, like u and v. This notation permits to differentiate between a vector and its components on a basis. In a similar way, linear transformations between vector spaces are denoted by boldface capital letters, like T and S. The exception are matrices in Fm,n^ which are denoted by capital sanserif letters like A and B. Again, this notation is useful to differentiate between a linear transformation and its
components on two bases. Below is a list of few mathematical symbols used in these notes:
R Set of real numbers, Q Set of rational numbers, Z Set of integer numbers, N Set of positive integers, { 0 } Zero set, ∅ Empty set, ∪ Union of sets, ∩ Intersection of sets, := Definition, ⇒ Implies, ∀ For all, ∃ There exists, Proof Beginning of a proof, § End of a proof, Example Beginning of an example, C End of an example.
Acknowledgments. I thanks all my students for pointing out several misprints and for helping make these notes more readable. I am specially grateful to Zhuo Wang and Wenning Feng.
It is interesting to remark what cannot happen, for example there is no 2×2 linear system having only two solutions. Unlike the quadratic equation x^2 − 5 x + 6 = 0, which has two solutions given by x = 2 and x = 3, a 2 × 2 linear system has only one solution, or infinitely many solutions, or no solution at all. Examples of these three cases, respectively, are given in Fig. 3.
x
y
x
y
x
y
Figure 3. An example of the cases given in Theorem 1.1.1, cases (i)-(iii).
Proof of Theorem 1.1.1: The solutions of each equation in a 2×2 linear system represents a line in R^2. Two lines in R^2 can intersect at a point, or can be coincident, or can be parallel but not coincident. These are the cases given in (i)-(iii). This establishes the Theorem. § We now generalize the definition of a 2 × 2 linear system given in the Example 1.1.1 to m equations of n unknowns.
Definition 1.1.2. An m × n linear system is a set of m > 1 linear equations in n > 1 unknowns is the following: Given the coefficients numbers Aij and the source numbers bi, with i = 1, · · · , m and j = 1, · · · n, find the real numbers xj solutions of
A 11 x 1 + · · · + A 1 nxn = b 1 .. . Am 1 x 1 + · · · + Amnxn = bm.
Furthermore, an m × n linear system is called consistent iff it has a solution, and it is called inconsistent iff it has no solutions.
Example 1.1.2: Find all numbers x 1 , x 2 and x 3 solutions of the 2 × 3 linear system
x 1 + 2x 2 + x 3 = 1 − 3 x 1 − x 2 − 8 x 3 = 2
Solution: Compute x 1 from the first equation, x 1 = 1 − 2 x 2 − x 3 , and substitute it in the second equation,
−3 (1 − 2 x 2 − x 3 ) − x 2 − 8 x 3 = 2 ⇒ 5 x 2 − 5 x 3 = 5 ⇒ x 2 = 1 + x 3.
Substitute the expression for x 2 in the equation above for x 1 , and we obtain
x 1 = 1 − 2 (1 + x 3 ) − x 3 = 1 − 2 − 2 x 3 − x 3 ⇒ x 1 = − 1 − 3 x 3.
Since there is no condition on x 3 , the system above has infinitely many solutions paramet- rized by the number x 3. We conclude that x 1 = − 1 − 3 x 3 , and x 2 = 1 + x 3 , while x 3 is free. C
Example 1.1.3: Find all numbers x 1 , x 2 and x 3 solutions of the 3 × 3 linear system
2 x 1 + x 2 + x 3 = 2 −x 1 + 2x 2 = 1 x 1 − x 2 + 2x 3 = − 2.
Solution: While the row picture is appropriate to solve small systems of linear equations, it becomes difficult to carry out on 3 × 3 and bigger linear systems. The solution x 1 , x 2 , x 3 of the system above can be found as follows: Substitute the second equation into the first,
x 1 = −1 + 2x 2 ⇒ x 3 = 2 − 2 x 1 − x 2 = 2 + 2 − 4 x 2 − x 2 ⇒ x 3 = 4 − 5 x 2 ;
then, substitute the second equation and x 3 = 4 − 5 x 2 into the third equation,
(−1 + 2x 2 ) − x 2 + 2(4 − 5 x 2 ) = − 2 ⇒ x 2 = 1,
and then, substituting backwards, x 1 = 1 and x 3 = −1. We conclude that the solution is a single point in space given by (1, 1 , −1). C
The solution of each separate equation in the examples above represents a plane in R^3. A solution to the whole system is a point that belongs to the three planes. In the 3 × 3 system in Example 1.1.3 above there is a unique solution, the point (1, 1 , −1), which means that the three planes intersect at a single point. In the general case, a 3 × 3 system can have a unique solution, infinitely many solutions or no solutions at all, depending on how the three planes in space intersect among them. The case with unique solution was represented in Fig. 4, while two possible situations corresponding to no solution are given in Fig. 5. Finally, two cases of 3 × 3 linear system having infinitely many solutions are pictured in Fig 6, where in the first case the solutions form a line, and in the second case the solutions form a plane because the three planes coincide.
Figure 4. Planes representing the solutions of each row equation in a 3× 3 linear system having a unique solution.
Figure 5. Two cases of planes representing the solutions of each row equa- tion in 3 × 3 linear systems having no solutions.
Solutions of linear systems with more than three unknowns can not be represented in the three dimensional space. Besides, the substitution method becomes more involved to solve. As a consequence, alternative ideas are needed to solve such systems. We now discuss one
know that the solution is given by x 1 = 1 and x 2 = 2, therefore in the column picture interpretation the following equation must hold [ 2 − 1
The study of this example suggests that the multiplication law of a vector by numbers and the addition law of two vectors can be defined by the following equations, respectively, [ − 1 2
The study of several examples of 2 × 2 linear systems in the column picture determines the following definition.
Definition 1.1.3. The linear combination of the 2 -vectors u =
u 1 u 2
and v =
v 1 v 2
, with
the real numbers a and b, is defined as follows,
a
u 1 u 2
v 1 v 2
au 1 + bv 1 au 2 + bv 2
A linear combination includes the particular cases of addition (a = b = 1), and multipli- cation of a vector by a number (b = 0), respectively given by, [ u 1 u 2
v 1 v 2
u 1 + v 1 u 2 + v 2
, a
u 1 u 2
au 1 au 2
The addition law in terms of components is represented graphically by the parallelogram law, as it can be seen in Fig. 8. The multiplication of a vector by a number a affects the length and direction of the vector. The product au stretches the vector u when a > 1 and it compresses u when 0 < a < 1. If a < 0 then it reverses the direction of u and it stretches when a < −1 and compresses when − 1 < a < 0. Fig. 8 represents some of these possibilities. Notice that the difference of two vectors is a particular case of the parallelogram law, as it can be seen in Fig. 9.
V v
v w
w
2
2
1 1
1
x 2
(v+w)
x (^1)
(v+w) 2
V+W
W
a > 1 V
− V a = −
0 < a < 1
a V
a V
Figure 8. The addition of vectors can be computed with the parallelogram law. The multiplication of a vector by a number stretches or compresses the vector, and changes it direction in the case that the number is negative.
The column picture interpretation of a general 2×2 linear system given in Eqs. (1.1)-(1.2) is the following: Introduce the coefficient and source column vectors
A 1 =
, b =
b 1 b 2
W − W
V
V − W V + W V
W
V + ( − W )
Figure 9. The difference of two vectors is a particular case of the paral- lelogram law of addition of vectors.
and then find the coefficients x 1 and x 2 that change the length of the coefficient column vectors A 1 and A 2 such that they add up to the source column vector b, that is,
A 1 x 1 + A 2 x 2 = b.
For example, the column picture of the linear system in Eqs. (1.7)-(1.8) is given in Eq. (1.9). The solution of this system are the numbers x 1 = 1 and x 2 = 2, and this solution is represented in Fig. 10.
x
b
2 A 2
A (^) 1
x 1
4
−2 2 −
2 2
A 2
2 A 2
4
2
−2 (^) −1 x 1
x
Figure 10. Representation of the solution of a 2 × 2 linear system in the column picture.
The existence and uniqueness of solutions in the case of 2 × 2 systems can be studied geometrically in the column picture as it was done in the row picture. In the latter case we have seen that all possible 2 × 2 systems fall into one of these three cases, unique solution, infinitely many solutions and no solutions at all. The proof was to study all possible ways two lines can intersect on the plane. The same existence and uniqueness statement can be proved in the column picture. In Fig. 11 we present these three cases in both row and column pictures. In the latter case the proof is to study all possible relative positions of the column vectors A 1 , A 2 , and b on the plane. We see in Fig. 11 that the first case corresponds to a system with unique solution. There is only one linear combination of the coefficient vectors A 1 and A 2 which adds up to b. The reason is that the coefficient vectors are not proportional to each other. The second case corresponds to the case of infinitely many solutions. The coefficient vectors are proportional to each other and the source vector b is also proportional to them. So, there are infinitely many linear combinations of the coefficient vectors that add up to the source vector. The last case corresponds to the case of no solutions. While the coefficient vectors are proportional to each other, the source vector is not proportional to them. So, there is no linear combination of the coefficient vectors that add up to the source vector.
1.1.3. Exercises.
1.1.1.- Use the substitution method to find the solutions to the 2 × 2 linear system 2 x − y = 1, x + y = 5.
1.1.2.- Sketch the three lines solution of each row in the system x + 2y = 2 x − y = 2 y = 1. Is this linear system consistent?
1.1.3.- Sketch a graph representing the so- lutions of each row in the following non- linear system, and decide whether it has solutions or not, x^2 + y^2 = 4 x − y = 0.
1.1.4.- Graph on the plane the solution of each individual equation of the 3×2 lin- ear system system 3 x − y = 0, x + 2y = 4, −x + y = − 2 , and determine whether the system is consistent or inconsistent.
1.1.5.- Show that the 3 × 3 linear system x + y + z = 2, x + 2y + 3z = 1, y + 2z = 0, is inconsistent, by finding a combination of the three equations that ads up to the equation 0 = 1.
1.1.6.- Find all values of the constant k such that there exists infinitely many solutions to the 2 × 2 linear system kx + 2y = 0,
x + k 2 y = 0.
1.1.7.- Sketch a graph of the vectors
A 1 =
» 1 2
» 2 1
» 1 − 1
Is the linear system A 1 x 1 + A 2 x 2 = b consistent? If the answer is “yes,” find the solution.
1.1.8.- Consider the vectors A 1 =
» 4 2
» − 2 − 1
» 2 0
(a) Graph the vectors A 1 , A 2 and b on the plane. (b) Is the linear system A 1 x 1 +A 2 x 2 = b consistent? (c) Given the vector c =
» 6 3
1.1.9.- Consider the vectors A 1 =
» 4 2
» − 2 − 1
and given a real number h, set c =
ˆ (^2) h
˜ . Find all values of h such that the system A 1 x 1 + A 2 x 2 = c is consistent.
1.1.10.- Show that the three vectors below lie on the same plane, by expressing the third vector as a linear combination of the first two, where
A 1 =
2 4
1 1 0
3 (^5) , A 2 =
2 4
1 2 1
3 (^5) , A 3 =
2 4
1 3 2
3 (^5).
Is the linear system A 1 x 1 + A 2 x 2 + A 3 x 3 = 0 consistent? If the answer is “yes,” is the solution unique?
1.2. Gauss-Jordan method
1.2.1. The augmented matrix. Solutions to m × n linear systems can be obtained in an efficient way using the Gauss-Jordan method. Efficient here means to perform as few algebraic operations as possible either to find the solution or to show that the solution does not exist. Before introducing this method, we need several definitions.
Definition 1.2.1. The coefficients matrix, the source vector, and the augmented matrix of the m × n linear system
A 11 x 1 + · · · + A 1 nxn = b 1 .. . Am 1 x 1 + · · · + Amnxn = bm,
are given by, respectively,
A 11 · · · A 1 n .. .
Am 1 · · · Amn
,^ b^ =
b 1 .. . bm
A|b
A 11 · · · A 1 n
∣ b^1 .. .
Am 1 · · · Amn
∣ bm
We call A an m × n matrix, with m the number of rows and n the number of columns. The source vector b is a particular case of an m × 1 matrix. The augmented matrix of an m × n linear system is given by the coefficient matrix and the source vector together, hence it is an m × (n + 1) matrix.
Example 1.2.1: Find the coefficient matrix, the source vector and the augmented matrix of the 2 × 2 linear system
2 x 1 − x 2 = 0, (1.12) −x 1 + 2x 2 = 3. (1.13)
Solution: The coefficient matrix is 2 × 2, the source vector is 2 × 1, and the augmented matrix is 2 × 3, given respectively by
A =
, b =
, [A|b] =
Example 1.2.2: Find the coefficient matrix, the source vector and the augmented matrix of the 2 × 3 linear system
2 x 1 − x 2 = 0, −x 1 + 2x 2 + 3x 3 = 0.
Solution: The coefficient matrix is 2 × 3, the source vector is 2 × 1, and the augmented matrix is 2 × 4, given respectively by
A =
, b =
, [A|b] =
Notice that the coefficent matrix in this example is equal to the augmented matrix in the previous Example. This means that the vertical separator in the definition of the augmented
The Gauss elimination operations change the coefficients of the augmented matrix of a system but do not change its solution. Two systems of linear equations having the same solutions are called equivalent. The Gauss-Jordan Method is an algorithm using these operations that transforms any linear system into an equivalent system where the solutions are given explicitly. We describe the Gauss-Jordan Method only through examples.
Example 1.2.5: Find the solution of the 2 × 2 linear system with augmented matrix given in Eq. (1.14) using Gauss operations.
Solution: (^) [ 2 − 1
The Gauss operations have changed the augmented matrix of the original system as follows: [ 2 − 1
Since the Gauss operations do not change the solution of the associated linear systems, the augmented matrices above imply that the following two linear systems have the same solutions, 2 x 1 − x 2 = 0, −x 1 + 2x 2 = 3.
{ (^) x 1 = 1, x 2 = 2.
On the last system the solution is given explicitly, x 1 = 1, x 2 = 2, since no additional algebraic operations are needed to find the solution. C
A precise way to define the notion of an augmented matrix corresponding to a linear system with solutions “easy to read” is captured in the notions of echelon form of a matrix, and reduced echelon form of a matrix. Next Section is dedicated to present these notions in some detail.
1.2.3. Square systems. In the rest of this Section we study a particular type of linear systems having the same number of equations and unknowns.
Definition 1.2.4. An m × n linear system is called a square system iff holds that m = n.
An example of a square system is the 2 × 2 linear system in Eqs. (1.12)-(1.13). In the rest of this Section we introduce the Gauss operations and back substitution method to find solutions to square linear systems. We later on compare this method with the Gauss-Jordan Method restricted to square linear systems. We start using Gauss operations and back substitution to find solutions to square n × n linear systems. This method has two main parts: First, use Gauss operations to transform the augmented matrix of the system into an upper triangular form. Second, use back substitution to compute the solution to the system.
Example 1.2.6: Use the Gauss operations and back substitution to solve the 3 × 3 system
2 x 1 + x 2 + x 3 = 2 −x 1 + 2x 2 = 1 x 1 − x 2 + 2x 3 = − 2.
Solution: We have already seen in Example 1.1.3 that the solution of this system is given by x 1 = x 2 = 1, x 3 = −1. Let us find that solution using Gauss operations with back
substitution. First transform the augmented matrix of the system into upper triangular form:
We now write the linear system corresponding to the last augmented matrix,
2 x 1 − x 2 + 2x 3 = − 2 x 2 + 2x 3 = − 1 x 3 = − 1.
We now use the back substitution to obtain the solution, that is, introduce x 3 = −1 into the second equation, which gives us x 2 = 1. Then, substitute x 3 = −1 and x 2 = 1 into the first equation, which gives us x 1 = 1. C
We now use the Gauss-Jordan Method to find solutions to square n × n linear systems. This is a minor modification of the Gauss operations and back substitution method. The difference is that now we do not stop doing Gauss operations when the augmented matrix becomes upper triangular. We keep doing Gauss operations in order to make zeros above the diagonal. Then, back substitution will no be needed to find the solution of the linear system. The solution will be given explicitly at the end of the procedure.
Example 1.2.7: Use the Gauss-Jordan method to solve the same 3 × 3 linear system as in Example 1.2.6, that is,
2 x 1 + x 2 + x 3 = 2 −x 1 + 2x 2 = 1 x 1 − x 2 + 2x 3 = − 2.
Solution: In Example 1.2.6 we performed Gauss operations on the augmented matrix of the system above until we obtained an upper triangular matrix, that is,
The idea now is to continue with Gauss operations, as follows:
x 1 = 1, x 2 = 1, x 3 = − 1.
In the last step we do not need to do back substitution to compute the solution. It is obtained without doing any further algebraic operation. C
Further reading. Almost every linear algebra book describes the Gauss-Jordan method. See Section 1.2 in Lay’s book [2] for a summary of echelon forms and the Gauss-Jordan method. See Sections 1.2 and 1.3 in Meyer’s book [3] for more details on Gauss elimination operations and back substitution. Also see Section 1.3 in Strang’s book [4].