Basic Linear Algebra In this chapter,we study the topics in linear algebra that will be needed in the rest of the book. We begin by discussing the building blocks of linear algebra:matrices and vectors.Then we use our knowledge of matrices and vectors to develop a systematic procedure(the Gauss- Jordan method)for solving linear equations,which we then use to invert matrices.We close the chapter with an introduction to determinants. The material covered in this chapter will be used in our study of linear and nonlinear programming. 2.1 Matrices and Vectors Matrices DEFINITION■ A matrix is any rectangular array of numbers. For example, [ [21] are all matrices. If a matrix A has m rows and n columns,we call A an m x n matrix.We refer to m X n as the order of the matrix.A typical m X n matrix A may be written as a11a12… a21 a22 A DEFINITION■ The number in the ith row and ith column of A is called the ijth element of 4 6 and is written ay For example,if [12 31 A=45 6 789 then a11=1,a23=6,anda31=7
Basic Linear Algebra In this chapter, we study the topics in linear algebra that will be needed in the rest of the book. We begin by discussing the building blocks of linear algebra: matrices and vectors. Then we use our knowledge of matrices and vectors to develop a systematic procedure (the Gauss– Jordan method) for solving linear equations, which we then use to invert matrices. We close the chapter with an introduction to determinants. The material covered in this chapter will be used in our study of linear and nonlinear programming. 2.1 Matrices and Vectors Matrices DEFINITION ■ A matrix is any rectangular array of numbers. ■ For example, , , , [2 1] are all matrices. If a matrix A has m rows and n columns, we call A an m n matrix. We refer to m n as the order of the matrix. A typical m n matrix A may be written as A DEFINITION ■ The number in the ith row and jth column of A is called the ijth element of A and is written aij. ■ For example, if A then a11 1, a23 6, and a31 7. 3 6 9 2 5 8 1 4 7 a1n a2n amn a12 a22 am2 a11 a21 am1 1 2 3 6 2 5 1 4 2 4 1 3
Sometimes we will use the notation 4=[ay]to indicate that 4 is the matrix whose iith element is ay. DEFINITION Two matrices A =[al and B=[bl are equal if and only if 4 and B are of the same order and for all i and j,ay=by. For example,if and then A B if and only ifx 1,y 2,w=3,and z =4. Vectors Any matrix with only one column (that is,any mX I matrix)may be thought of as a column vector.The number of rows in a column vector is the dimension of the column vector.Thus, 「1 2 may be thought of as a 2 X 1 matrix or a two-dimensional column vector.R"will denote the set of all m-dimensional column vectors. In analogous fashion,we can think of any vector with only one row(a 1 X n matrix as a row vector.The dimension of a row vector is the number of columns in the vector.Thus, [9 2 3]may be viewed as a 1 X 3 matrix or a three-dimensional row vector.In this book, vectors appear in boldface type:for instance,vector v.An m-dimensional vector(either row or column)in which all elements equal zero is called a zero vector (written 0).Thus, 0 [00] and 0 are two-dimensional zero vectors. Any m-dimensional vector corresponds to a directed line segment in the m-dimensional plane.For example,in the two-dimensional plane,the vector 17 2 corresponds to the line segment joining the point 01 to the point 周 The directed line segments corresponding to u-卧v=[w=[2 are drawn in Figure 1
Sometimes we will use the notation A [aij] to indicate that A is the matrix whose ijth element is aij. DEFINITION ■ Two matrices A [aij] and B [bij] are equal if and only if A and B are of the same order and for all i and j, aij bij. ■ For example, if A and B then A B if and only if x 1, y 2, w 3, and z 4. Vectors Any matrix with only one column (that is, any m 1 matrix) may be thought of as a column vector. The number of rows in a column vector is the dimension of the column vector. Thus, may be thought of as a 2 1 matrix or a two-dimensional column vector. Rm will denote the set of all m-dimensional column vectors. In analogous fashion, we can think of any vector with only one row (a 1 n matrix as a row vector. The dimension of a row vector is the number of columns in the vector. Thus, [9 2 3] may be viewed as a 1 3 matrix or a three-dimensional row vector. In this book, vectors appear in boldface type: for instance, vector v. An m-dimensional vector (either row or column) in which all elements equal zero is called a zero vector (written 0). Thus, [0 0] and are two-dimensional zero vectors. Any m-dimensional vector corresponds to a directed line segment in the m-dimensional plane. For example, in the two-dimensional plane, the vector u corresponds to the line segment joining the point to the point The directed line segments corresponding to u , v , w are drawn in Figure 1. 1 2 1 3 1 2 1 2 0 0 1 2 0 0 1 2 y z x w 2 4 1 3 12 CHAPTER 2 Basic Linear Algebra
-[ (1,2) -2 (-1,-2) FIGURE 1 (1,-3) Vectors Are Directed Line Segments The Scalar Product of Two Vectors An important result of multiplying two vectors is the scalar product.To define the scalar prod- uct of two vectors,suppose we have a row vector u=[u u2..u]and a column vector 2 : of the same dimension.The scalar product of u and v(written u.v)is the number 4M+22+…+山nym For the scalar product of two vectors to be defined,the first vector must be a row vec- tor and the second vector must be a column vector.For example,if u=[123] and V= 21 2 then u.v=1(2)+2(1)+3(2)=10.By these rules for computing a scalar product,if u- and v=[23] then u.v is not defined.Also,if u=[123] and then u.v is not defined because the vectors are of two different dimensions. Note that two vectors are perpendicular if and only if their scalar product equals 0. Thus,the vectors [1 -1]and [1 1]are perpendicular. We note that u v=uv cos 0,wherelul is the length of the vector u and 0 is the angle between the vectors u and v
The Scalar Product of Two Vectors An important result of multiplying two vectors is the scalar product. To define the scalar product of two vectors, suppose we have a row vector u = [u1 u2 un] and a column vector v of the same dimension. The scalar product of u and v (written u v) is the number u1v1 u2v2 unvn. For the scalar product of two vectors to be defined, the first vector must be a row vector and the second vector must be a column vector. For example, if u [1 2 3] and v then u v 1(2) 2(1) 3(2) 10. By these rules for computing a scalar product, if u and v [2 3] then u v is not defined. Also, if u [1 2 3] and v then u v is not defined because the vectors are of two different dimensions. Note that two vectors are perpendicular if and only if their scalar product equals 0. Thus, the vectors [1 1] and [1 1] are perpendicular. We note that u v u v cos u, where u is the length of the vector u and u is the angle between the vectors u and v. 3 4 1 2 2 1 2 v1 v2 vn 2.1 Matrices and Vectors 13 3 2 x2 x1 1 – 1 – 2 – 2 w u v – 1 (–1, –2) (1, 2) u = 1 2 v = w = (1, –3) 1 2 – 3 1 –3 –2 –1 FIGURE 1 Vectors Are Directed Line Segments
Matrix Operations We now describe the arithmetic operations on matrices that are used later in this book. The Scalar Multiple of a Matrix Given any matrix A and any number c(a number is sometimes referred to as a scalar), the matrix cA is obtained from the matrix A by multiplying each element of A by c.For example, 4=[ 3A1 36 then -30 For c =-1,scalar multiplication of the matrix A is sometimes written as -A. Addition of Two Matrices Let 4 [ay]and B =[b]be two matrices with the same order (say,m x n).Then the matrix C=4 B is defined to be the m x n matrix whose ijth element is ay+by.Thus, to obtain the sum of two matrices A and B,we add the corresponding elements of A and B.For example,if 4=[07 -11 and then A+B=-1 [02-988 This rule for matrix addition may be used to add vectors of the same dimension.For ex- ample,if u [1 2]and v=[2 1],then u v=[1 +22+1]=[3 3].Vectors may be added geometrically by the parallelogram law(see Figure 2). We can use scalar multiplication and the addition of matrices to define the concept of a line segment.A glance at Figure 1 should convince you that any point u in the m-dimensional plane corresponds to the m-dimensional vector u formed by joining the origin to the point u.For any two points u and v in the m-dimensional plane,the line segment joining u and v(called the line segment uv)is the set of all points in the m-dimensional plane that correspond to the vectors cu +(1-c)v,where 0 scs1 (Figure 3).For example,if u =(1,2)and v=(2,1),then the line segment uv consists =[21] u=[12] u+y=[33] (3.3) (1,2 u+¥ (21) (00) FIGURE 2 Addition of Vectors
Matrix Operations We now describe the arithmetic operations on matrices that are used later in this book. The Scalar Multiple of a Matrix Given any matrix A and any number c (a number is sometimes referred to as a scalar), the matrix cA is obtained from the matrix A by multiplying each element of A by c. For example, if A , then 3A For c 1, scalar multiplication of the matrix A is sometimes written as A. Addition of Two Matrices Let A [aij] and B [bij] be two matrices with the same order (say, m n). Then the matrix C A B is defined to be the m n matrix whose ijth element is aij bij. Thus, to obtain the sum of two matrices A and B, we add the corresponding elements of A and B. For example, if A and B then A B . This rule for matrix addition may be used to add vectors of the same dimension. For example, if u [1 2] and v [2 1], then u v [1 2 2 1] [3 3]. Vectors may be added geometrically by the parallelogram law (see Figure 2). We can use scalar multiplication and the addition of matrices to define the concept of a line segment. A glance at Figure 1 should convince you that any point u in the m-dimensional plane corresponds to the m-dimensional vector u formed by joining the origin to the point u. For any two points u and v in the m-dimensional plane, the line segment joining u and v (called the line segment uv) is the set of all points in the m-dimensional plane that correspond to the vectors cu (1 c)v, where 0 c 1 (Figure 3). For example, if u (1, 2) and v (2, 1), then the line segment uv consists 0 0 0 0 0 2 3 3 1 1 2 2 1 1 1 1 0 2 3 1 2 1 1 2 3 1 2 1 1 0 6 0 3 3 2 0 1 1 14 CHAPTER 2 Basic Linear Algebra 3 2 x2 x1 1 u u + v v (1, 2) (2, 1) (3, 3) (0, 0) v = 2 1 123 u = 1 2 u + v = 3 3 FIGURE 2 Addition of Vectors
FIGURE 3 Line Segment Joining u=(1,2)and v=2,1) of the points corresponding to the vectors c[l 2]+(1-c)[2 1]=[2-c 1 c], where 0cs1.For c=0 and c=1,we obtain the endpoints of the line segment uv; for c=,we obtain the midpoint(0.5u +0.5v)of the line segment uv. Using the parallelogram law,the line segment i may also be viewed as the points cor- responding to the vectors u +c(v-u),where 0scs1 (Figure 4).Observe that for c=0,we obtain the vector u (corresponding to point u),and for c=1,we obtain the vector v(corresponding to point v). The Transpose of a Matrix Given any m X n matrix a11 a12 ain] a21 a22 … A2n A= .: . LamI dm2 … an】 the transpose of (written 4)is the n x m matrix a11 a21 amI a412 a22 am2 AT= : din a2n … amn FIGURE 4 Representation of Line Segment uv
of the points corresponding to the vectors c[1 2] (1 c)[2 1] [2 c 1 c], where 0 c 1. For c 0 and c 1, we obtain the endpoints of the line segment uv; for c 1 2 , we obtain the midpoint (0.5u 0.5v) of the line segment uv. Using the parallelogram law, the line segment uv may also be viewed as the points corresponding to the vectors u c(v u), where 0 c 1 (Figure 4). Observe that for c 0, we obtain the vector u (corresponding to point u), and for c 1, we obtain the vector v (corresponding to point v). The Transpose of a Matrix Given any m n matrix A the transpose of A (written AT ) is the n m matrix AT am1 am2 amn a21 a22 a2n a11 a12 a1n a1n a2n amn a12 a22 am2 a11 a21 am1 2.1 Matrices and Vectors 15 2 x2 u c = 1 c = 0 c = v x1 1 1 2 1 2 FIGURE 3 Line Segment Joining u (1, 2) and v (2, 1) x2 u u – u v – u v c = 0 c = 1 c = v x1 1 2 FIGURE 4 Representation of Line Segment uv