# 1

EUM 114/3-SemII (2011/2012)

TOPIC 1 - LINEAR ALGEBRA • • • •

Matrices and determinants dealt with transformation of geometric objects and solution of systems of linear equations. Historically, the early emphasis was on the determinant, not the matrix. In modern treatments of linear algebra, matrices are considered first. Matrices in many types of problems including:
• • • • • • • • • • •

Solution of Systems of Linear Equations, Equilibrium of Rigid Bodies (in physics), Graph Theory, Theory of Games, Leontief Economics Model, Forest Management, Computer Graphics, and Computed Tomography, Genetics, Cryptography, Electrical Networks, Fractals.

-ExampleConsider three factories X, Y and Z. Every month, the factories have costs control for material, utilities, and other expenses shown in the following table. Represent the data collected in form of matrix?
Factory X Y Z Material cost (RM) a d g Utilities cost (RM) b e h 𝑈𝑈𝐹𝐹𝑀𝑀𝑀𝑀𝑀𝑀𝐹𝐹𝑀𝑀𝑀𝑀𝑈𝑈 𝑏𝑏 𝑀𝑀 ℎ ℎ 𝑏𝑏 𝐹𝐹 𝑀𝑀 Other expenses (RM) c f i

Solution 𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹

𝑋𝑋 Month =� 𝑌𝑌 𝑍𝑍 𝑀𝑀𝐹𝐹𝐹𝐹𝑀𝑀𝐹𝐹𝑀𝑀𝐹𝐹𝑀𝑀

𝐹𝐹 𝑑𝑑 𝑔𝑔

or just

Month =�𝑑𝑑 𝑀𝑀 𝑓𝑓 � 𝑔𝑔 𝐹𝐹 𝑂𝑂𝐹𝐹

ℎ𝑀𝑀𝐹𝐹 𝑀𝑀𝑒𝑒𝑒𝑒𝑀𝑀𝑒𝑒𝑈𝑈𝑀𝑀𝑈𝑈 𝐹𝐹 � 𝑓𝑓 𝑀𝑀

2
EUM 114/3-SemII (2011/2012)

The size of the matrix, as a block, is defined by the number of Rows and the number of Columns. • • • A matrix which has m rows and n columns; a (mxn) matrix (pronounce m-by-n matrix). When the numbers of rows and columns are equal, we call the matrix a square matrix. A square matrix of order n, is a (nxn) matrix.

-ExampleConsider the matrix in the previous example. Determine the size of the matrix.

Solution The matrix has 3 rows and 3 columns  3x3 matrix (a square matrix)

-Operations on Matrices(i) Addition/ Subtraction of Matrices: In order to add two matrices, we add the entries one by one. Note: Matrices involved in the addition operation must have the same size.

(ii) Multiplication/Division of a Matrix by a Number: In order to multiply a matrix by a number, you multiply every entry by the given number. For any number ,

-ExampleThe matrices for number of products produced in months of January, February, and March are given as

4 I + 0. and M from above.3 S) + 0. the population of the inner city is 0.3 S while the population of the suburbs is 0.3 (0.6 (0. We assume that every year 40% of the inner city population moves to the suburbs.3 EUM 114/3-SemII (2011/2012) Consider the three matrices J.7 S After two years. while 30% of the suburb population moves to the inner part of the city. -ExampleConsider a city with two kinds of population: the inner city population and the suburb population. So after one year. Evaluate Solution J-M = J + (-1)M Since J-F+2M = J + (-1)F + 2M. Let I (resp. the population of the inner part is 0. the suburban area).7 S) and the suburban population is given by . S) be the initial population of the inner city (resp.6 I + 0.6 I + 0. F.4 I + 0.

6 I + 0.4 I + 0.7 S) Represent the above operations in form of matrices. -Example- . Solution So after one year the two populations are If we consider the following rule (the product of two matrices) then the populations after one year are given by After two years the populations are -Multiplication of matrices• • The product of two non-zero matrices may be equal to the zero-matrix.3 S) + 0. the order in which matrices are multiplied is important.7(0.4 (0.4 EUM 114/3-SemII (2011/2012) 0. The matrix multiplication is not commutative.

then 𝛼𝛼(𝛽𝛽𝐵𝐵) = (𝛼𝛼𝛽𝛽)𝐵𝐵 = 𝛽𝛽(𝛼𝛼𝐵𝐵) . B. and C be three matrices. Let A. then 𝛽𝛽0 = 0 (zero-matrix) If 𝛼𝛼 is a number. and A and B are two matrices such that the product 𝛽𝛽 ∙ 𝐵𝐵is possible. A+B = 0 if and only if B = -A. then 𝛼𝛼(𝛽𝛽𝛽𝛽) = (𝛼𝛼𝛽𝛽)𝛽𝛽 If A is an n x m matrix and 0 the m x k zero-matrix. and C is 3x1matrices. B.  Let A. If the products AB.5 EUM 114/3-SemII (2011/2012) -Algebraic Properties of Matrix OperationsProperties involving Addition. Properties involving Multiplication. If𝛼𝛼 and 𝛽𝛽are numbers. B is 3x3. and A(BC) can be manipulated. • • • • A+B = B+A (A+B)+C = A + (B+C) A+0 = A where 0 is the mxn zero-matrix (all its entries are equal to 0). and A is a matrix. determine if the following products are possible? (a) (b) (c) (d) (e) AB (AB)C BC A(BC) (AB)C Determine the size of the product matrix. then (AB)C = A (BC) -TryIf A is 2x3. (AB)C. and C be m x n matrices. BC.

6 EUM 114/3-SemII (2011/2012) Properties involving Addition and Multiplication. Check that you get the same matrix. . then and A(B+C) = AB + AC 𝛼𝛼(𝛽𝛽 + 𝐵𝐵) = 𝛼𝛼𝛽𝛽 + 𝛼𝛼𝐵𝐵 (𝛼𝛼 + 𝛽𝛽)𝛽𝛽 = 𝛼𝛼𝛽𝛽 + 𝛽𝛽𝛽𝛽 -TryConsider the matrices Evaluate (AB)C and A(BC). (A+B)C = AC + BC and 2. 1. Let A. If 𝛼𝛼 and 𝛽𝛽 are numbers. A and B are matrices. B. and C be three matrices. Consider the matrices meaning that and These two formulas are called linear combinations.

A In = In A = A The matrix I n is called the Identity Matrix of order n. for any nxn matrix A.7 EUM 114/3-SemII (2011/2012) Consider The matrix I n has similar behavior as the number 1. Indeed. -Example- -TryConsider the matrices Proof that (a) (b) .

-Example- Let Hence A is invertible and B is its inverse. -ExampleFind the inverse of Solution Let . The inverse of a matrix A is denoted as A-1.8 EUM 114/3-SemII (2011/2012) -Invertible MatricesAn n x n matrix A is nonsingular or invertible if there exists an n x n matrix B such that 𝛽𝛽𝐵𝐵 = 𝐵𝐵𝛽𝛽 = 𝐼𝐼𝑒𝑒 where I n is the identity matrix. The matrix B is called the inverse matrix of A.

then the diagonal is given by the numbers a ii . Symmetric. if the m=n. if A is a square matrix of order n and if a ij is the number in the ith-row and jth-colum. Diagonal- The size of the matrix is given by the number of rows and the number of columns.. Square matrix For m x n matrix. then is also invertible -Special Matrices: Triangular..9 EUM 114/3-SemII (2011/2012) The inverse matrix is unique. we called such matrix a square matrix. for i=1. then A-1 is also invertible. If A is invertible. If A and B are invertible matrices.n.. . -Example-  (2 x 2 matrix)  (3 x 3 matrix) In general.

. upper-triangular  if the lower-block consists of zeros -Example- are upper-triangular lower-triangular  if the upper-block consists of zeros are lower-triangular -Example- The matrices A and B are triangular.10 EUM 114/3-SemII (2011/2012) -ExampleConsider So: a 11= a a 12= b a 21= c a 22= d Triangular matrix The diagonal of a square matrix define two types of matrices.

-Example- then -Properties of the Transpose operationIf X and Y are mxn matrices and Z is an nxk matrix. -Example- are symmetric matrices. denoted AT is the mxn matrix defined by the numbers b ij where b ij = a ji . then • • • (X+Y)T = XT + YT (XZ)T = ZT XT (XT)T = X *A symmetric matrix is a matrix equal to its transpose. then the transpose of A.11 EUM 114/3-SemII (2011/2012) Note • • if reflect the matrix A about the diagonal. Diagonal matrix Diagonal matrix is a symmetric matrix with all of its entries equal to zero except may be the ones on the diagonal. . matrix B is obtained This operation is called the transpose operation Let A be a nxm matrix defined by the numbers a ij . So a symmetric matrix must be a square matrix.

XTX = (a2 + b2 + c2).12 EUM 114/3-SemII (2011/2012) -Example- -Scalar Product Consider the 3x1 matrices The scalar product of X and Y is defined by In particular.  1 x 1 matrix . -ExampleConsider the matrix Its rows are Its columns are Consider the matrix transpose of A . -Elementary Operations for MatricesElementary operations for matrices important in finding the inverse or solving linear systems.

. Keep the second row and add the first to the second. Multiply a row with a nonzero number. Solution Start with A. Keep the first row. Definition Two matrices are row equivalent if and only if one may be obtained from the other one via elementary row operations. Add a row to another one multiplied by a number.13 EUM 114/3-SemII (2011/2012) Its rows are -Elementary Row Operations1. -ExampleShow that the two matrices are row equivalent. 3. 2. which is the matrix B. Interchange two rows. Therefore A and B are row equivalent. Then subtract the first row from the second one multiplied by 3. Keep the first row and subtract the first row from the second one.

we need to discuss when a matrix is row elementary equivalent to a triangular matrix. Solution   transform the first column via elementary row operations into one with the top number equal to 1 and the bottom ones equal 0. -ExampleConsider the following matrix Transform the matrix in echelon form. Indeed. In order to appreciate these two techniques. 2. any row consisting of zeros is below any row that contains at least one nonzero number. if we keep the first two rows and add the second one to the last one multiplied by 2.14 EUM 114/3-SemII (2011/2012)    One powerful use of elementary operations consists in finding solutions to linear systems and the inverse of a matrix. interchange the first row with the last one. . we get  we stop the process whenever we have a matrix which satisfies the following conditions 1. subtract the first one multiplied by 2 from the second one. the first (from left to right) nonzero entry of any row is to the left of the first nonzero entry of any lower row.  keep the first and last rows.  we can still take care of the 1 (from the last row) under the -2. This happens via Echelon Form and Gauss-Jordan Elimination.

that is • If we multiply one row with a constant. For example.15 EUM 114/3-SemII (2011/2012)   if we make sure that the first nonzero entry of every row is 1. that is . But if we divide the second row by -2. we get a matrix in row echelon form. the determinant of the new matrix is the opposite of the old one. -Properties of the Determinant Consider the matrix The matrix A is invertible if and only if 𝐹𝐹𝑑𝑑 − 𝑏𝑏𝐹𝐹 ≠ 0 . the matrix above is not in echelon form. we get  echelon form. • Any matrix A and its transpose have the same determinant. An application of this is to solve linear systems via Gaussian elimination. that is • If we interchange two rows. We called this number the determinant of A. meaning • The determinant of a triangular matrix is the product of the entries on the diagonal. the determinant of the new matrix is the determinant of the old one multiplied by the constant.

if A is invertible. If A and B are similar. the determinant of the new matrix is the same as the old one. that is Note To replace a row by something (through elementary operations). then determinant is zero. In particular. then -ExampleEvaluate Solution • transform this matrix into a triangular one through elementary operations. Otherwise. If we add one row to another one multiplied by a constant. 1 • keep the first row and add to the second one the first multiplied by 2 . you will easily make errors (due to Property 3). which happens if and only if.16 EUM 114/3-SemII (2011/2012) • • If all the entries in one row zero. do not multiply the row itself by a constant. 3.

17 EUM 114/3-SemII (2011/2012) -Determinants of Matrices of Higher Order- Assume that • • • • • Any matrix A and its transpose have the same determinant. If we multiply one row with a constant. the determinant of the new matrix is the determinant of the old one multiplied by the constant. the determinant of the new matrix is the opposite of the old one. If we add one row to another one multiplied by a constant. the determinant of the new matrix is the same as the old one. The determinant of a triangular matrix is the product of the entries on the diagonal. -ExampleEvaluate Solution -TryEvaluate . If we interchange two rows.

• For example. decrypting a coded message uses the inverse of a matrix. • Determinant may be used to answer this problem. • We know that A is invertible if and only if. Any row or any column will do. . we have along the rows or or -ExampleEvaluate Solution -Determinant and Inverse of Matrices• Finding the inverse of a matrix is very important in many areas of science. The trick is to use a row or a column which has a lot of zeros. In particular.18 EUM 114/3-SemII (2011/2012) -General Formula for the DeterminantTwo types of formulas: along a row (number i) or along a column (number j).

the only solution is the trivial one. In this case. meaning invertible. and the matrix A i is obtained from A by replacing the ith column by the column B. we have where the b i are the entries of B. then if A is • So if we are looking for a nonzero solution to the system. In other words. if the linear system AX = B is homogeneous. that is . and X the unknown columnmatrix. the solution is given by the Cramer's formulas: where x i are the unknowns of the system or the entries of X. We also know that this will happen if and only if . . B the nonhomogeneous term. • In particular. the matrix coefficient A must be singular or noninvertible. The linear system AX = B has a unique solution if and only if A is invertible. Theorem.19 EUM 114/3-SemII (2011/2012) -Application of Determinant to SystemsCramer's Rule Consider the linear system (in matrix form) AX=B where A is the matrix coefficient.

the determinant which gives z has two identical rows (the first and the last). Note.20 EUM 114/3-SemII (2011/2012) -ExampleSolve the linear system Solution which implies that the matrix coefficient is invertible. Indeed. Remember that Cramer's formulas are only valid for linear systems with an invertible matrix coefficient. . So we may use the Cramer's formulas. Note that it is easy to see that z=0.

-ExampleConsider a nutritious drink which consists of whole egg. here: x. milk. Systems of equations occur naturally in many real life problems. In order to answer that. y and z. and z). and z the amount of orange of juice (in cups). and orange juice. -Example- and are systems of two equations with two unknowns (x and y). Then we need to have The task of Solving a system consists of finding the unknowns. y. let x be the number of eggs. while is a system of two equations with three unknowns (x. The food energy and protein for each of the ingredients are given by the table: A natural question to ask is how much of each ingredient do we need to produce a drink of 540 calories and 25 grams of protein. y the amount of milk (in cups). . the problem of finding some unknowns linked to each others via equations is called a system of equations.21 EUM 114/3-SemII (2011/2012) -System of Equations: An IntroductionBasically.

z. the linear equation is said to be homogeneous. while is a nonlinear system (because of y2). The system is an homogeneous linear system. b. d. and w are unknown numbers. y. Definition. is called a linear equation. -Example- and are linear systems. c. . A linear system is a set of linear equations and a homogeneous linear system is a set of homogeneous linear equations. while x. The equation ax+by+cz+dw=h where a. and h are known numbers. • • If h =0.22 EUM 114/3-SemII (2011/2012) -Gaussian EliminationThere are numerical techniques which help to approximate nonlinear systems with linear ones in the hope that the solutions of the linear systems are close enough to the solutions of the nonlinear systems.

we can rewrite the linear system above as the matrix equation • • • • The matrix A is called the matrix coefficient of the linear system. then the matrix coefficient will be a nxm matrix and the augmented matrix an nx(m+1) matrix. where • In general if the linear system has n equations with m unknowns.23 EUM 114/3-SemII (2011/2012) -Matrix Representation of a Linear SystemMatrices are helpful in rewriting a linear system in a very simple form. consider the linear system Set the matrices Using matrix multiplications. The matrix C is called the nonhomogeneous term. The algebraic properties of matrices may then be used to solve systems. Its entries are the unknowns of the linear system. Definition Two linear systems with n unknowns are said to be equivalent if and only if they have the same set of solutions. the linear system is homogeneous. The augmented matrix associated with the system is the matrix [A|C]. . The matrix X is the unknown matrix. When . First.

24 EUM 114/3-SemII (2011/2012) -ExampleConsider the linear system • • • The idea is to keep the first equation and work on the last two. For example. we keep the first and second equation. We repeat the same procedure. and subtract the first one from the last one . if we keep the first and second equation. Indeed. Try to kill one of the two unknowns (y or z). we get the equivalent system keep the first and the last equation. focus on the second and the third equation. and subtract the first from the second. • • perform some elementary row operations on this matrix. Try to kill one of the unknowns and solve for the other two. keep the first and second row. and we add the second to the third after multiplying it by 3. and subtract the first one from the last one. Going from the last equation to the first while solving for the unknowns is called backsolving.

and then apply the method of back substitution to solve the new system. Gaussian Elimination Steps Consider a linear system. Then we keep the first and second row. Use elementary row operations to transform the augmented matrix into a triangular one. and we add the second to the third after multiplying it by 3 to get This is known as Gaussian Elimination. -ExampleSolve the following system via Gaussian elimination Solution The augmented matrix is . Some parametric values need to be assigned to some unknowns. and we subtract the first from the second. Solve the new system. • • • • Construct the augmented matrix for the system.25 EUM 114/3-SemII (2011/2012) keep the first and the last rows. Write down the new linear system for which the triangular matrix is the associated augmented matrix.

We add the last one to the third to get This is a triangular matrix.26 EUM 114/3-SemII (2011/2012) use elementary row operations to transform this matrix into a triangular one. then we have The first equation implies Putting all together 3 1 3 𝑒𝑒 = 2 + 𝐹𝐹 + 𝑧𝑧 − 𝑤𝑤 − 𝑣𝑣 2 2 2 . Set z=s and w=t. Keep the first three rows. Keep the first row and use it to produce all zeros elsewhere in the first column. Its associated system is Clearly we have v = 1. Keep the first and second row and try to have zeros in the second column.

27 EUM 114/3-SemII (2011/2012) -TryUse Gaussian elimination to solve the linear system Definition. Otherwise the linear system is called consistent. In other words. . the set of solutions is empty. A linear system is called inconsistent or overdetermined if it does not have a solution.