Vous êtes sur la page 1sur 27

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

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

Consider the three matrices J, F, and M from above. Evaluate

Solution

J-M = J + (-1)M

Since J-F+2M = J + (-1)F + 2M,

-ExampleConsider a city with two kinds of population: the inner city population and the suburb population. We assume that every year 40% of the inner city population moves to the suburbs, while 30% of the suburb population moves to the inner part of the city. Let I (resp. S) be the initial population of the inner city (resp. the suburban area). So after one year, the population of the inner part is 0.6 I + 0.3 S while the population of the suburbs is 0.4 I + 0.7 S After two years, the population of the inner city is 0.6 (0.6 I + 0.3 S) + 0.3 (0.4 I + 0.7 S) and the suburban population is given by

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

0.4 (0.6 I + 0.3 S) + 0.7(0.4 I + 0.7 S) Represent the above operations in form of matrices. 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. The matrix multiplication is not commutative, the order in which matrices are multiplied is important.

-Example-

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

-Algebraic Properties of Matrix OperationsProperties involving Addition. Let A, B, and C be m x n matrices. 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); A+B = 0 if and only if B = -A.

Properties involving Multiplication. Let A, B, and C be three matrices.

If the products AB, (AB)C, BC, and A(BC) can be manipulated, then (AB)C = A (BC)

-TryIf A is 2x3, B is 3x3, and C is 3x1matrices, 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. If and are numbers, and A is a matrix, then () = () If A is an n x m matrix and 0 the m x k zero-matrix, then 0 = 0 (zero-matrix) If is a number, and A and B are two matrices such that the product is possible, then () = () = ()

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

Properties involving Addition and Multiplication. 1. Let A, B, and C be three matrices. (A+B)C = AC + BC and 2. If and are numbers, A and B are matrices, then and A(B+C) = AB + AC ( + ) = + ( + ) = +

-TryConsider the matrices

Evaluate (AB)C and A(BC). Check that you get the same matrix.

Consider the matrices

meaning that

and

These two formulas are called linear combinations.

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

Consider

The matrix I n has similar behavior as the number 1. Indeed, for any nxn matrix A, A In = In A = A The matrix I n is called the Identity Matrix of order n.

-Example-

-TryConsider the matrices

Proof that (a) (b)

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.

-Example-

Let

Hence A is invertible and B is its inverse. The inverse of a matrix A is denoted as A-1.

-ExampleFind the inverse of

Solution Let

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

The inverse matrix is unique. If A is invertible, then A-1 is also invertible.

If A and B are invertible matrices, then

is also invertible

-Special Matrices: Triangular, Symmetric, 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, if the m=n, we called such matrix a square matrix.

-Example-

(2 x 2 matrix)

(3 x 3 matrix) In general, if A is a square matrix of order n and if a ij is the number in the ith-row and jth-colum, then the diagonal is given by the numbers a ii , for i=1,..,n.

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. 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.

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

Note

if reflect the matrix A about 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 , then the transpose of A, denoted AT is the mxn matrix defined by the numbers b ij where b ij = a ji .

-Example-

then

-Properties of the Transpose operationIf X and Y are mxn matrices and Z is an nxk matrix, then (X+Y)T = XT + YT (XZ)T = ZT XT (XT)T = X

*A symmetric matrix is a matrix equal to its transpose. So a symmetric matrix must be a square matrix.

-Example-

are symmetric matrices.

Diagonal matrix Diagonal matrix is a symmetric matrix with all of its entries equal to zero except may be the ones on the diagonal.

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, XTX = (a2 + b2 + c2). 1 x 1 matrix .

-Elementary Operations for MatricesElementary operations for matrices important in finding the inverse or solving linear systems. -ExampleConsider the matrix

Its rows are Its columns are

Consider the matrix transpose of A

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

Its rows are

-Elementary Row Operations1. Interchange two rows. 2. Multiply a row with a nonzero number. 3. Add a row to another one multiplied by a number. Definition Two matrices are row equivalent if and only if one may be obtained from the other one via elementary row operations. -ExampleShow that the two matrices

are row equivalent. Solution Start with A. Keep the second row and add the first to the second,

Keep the first row. 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.

which is the matrix B. Therefore A and B are row equivalent.

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. This happens via Echelon Form and Gauss-Jordan Elimination. In order to appreciate these two techniques, we need to discuss when a matrix is row elementary equivalent to a triangular matrix.

-ExampleConsider the following matrix

Transform the matrix in echelon form. Solution transform the first column via elementary row operations into one with the top number equal to 1 and the bottom ones equal 0. interchange the first row with the last one,

keep the first and last rows, subtract the first one multiplied by 2 from the second one.

we can still take care of the 1 (from the last row) under the -2. Indeed, if we keep the first two rows and add the second one to the last one multiplied by 2, we get

we stop the process whenever we have a matrix which satisfies the following conditions

1. any row consisting of zeros is below any row that contains at least one nonzero number; 2. the first (from left to right) nonzero entry of any row is to the left of the first nonzero entry of any lower row.

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

if we make sure that the first nonzero entry of every row is 1, we get a matrix in row echelon form. For example, the matrix above is not in echelon form. But if we divide the second row by -2, we get

echelon form. An application of this is to solve linear systems via Gaussian elimination.

-Properties of the Determinant Consider the matrix

The matrix A is invertible if and only if 0 . We called this number the determinant of A.

Any matrix A and its transpose have the same determinant, meaning

The determinant of a triangular matrix is the product of the entries on the diagonal, that is

If we interchange two rows, the determinant of the new matrix is the opposite of the old one, that is

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, that is

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

If all the entries in one row zero, then determinant is zero. 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, that is

Note To replace a row by something (through elementary operations), do not multiply the row itself by a constant. Otherwise, you will easily make errors (due to Property 3). 3. In particular, if A is invertible, which happens if and only if,

If A and B are similar, then

-ExampleEvaluate

Solution transform this matrix into a triangular one through elementary operations. 1 keep the first row and add to the second one the first multiplied by 2

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. The determinant of a triangular matrix is the product of the entries on the diagonal. If we interchange two rows, the determinant of the new matrix is the opposite of the old one. 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. 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.

-ExampleEvaluate

Solution

-TryEvaluate

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). Any row or any column will do. The trick is to use a row or a column which has a lot of zeros. In particular, 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. 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.

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, B the nonhomogeneous term, and X the unknown columnmatrix.

Theorem. The linear system AX = B has a unique solution if and only if A is invertible. In this case, the solution is given by the Cramer's formulas:

where x i are the unknowns of the system or the entries of X, and the matrix A i is obtained from A by replacing the ith column by the column B. In other words, we have

where the b i are the entries of B. In particular, if the linear system AX = B is homogeneous, meaning invertible, the only solution is the trivial one, that is . , then if A is

So if we are looking for a nonzero solution to the system, the matrix coefficient A must be singular or noninvertible. We also know that this will happen if and only if

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

-ExampleSolve the linear system

Solution

which implies that the matrix coefficient is invertible. So we may use the Cramer's formulas.

Note that it is easy to see that z=0. Indeed, the determinant which gives z has two identical rows (the first and the last).

Note. Remember that Cramer's formulas are only valid for linear systems with an invertible matrix coefficient.

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

-System of Equations: An IntroductionBasically, the problem of finding some unknowns linked to each others via equations is called a system of equations. -Example-

and

are systems of two equations with two unknowns (x and y), while

is a system of two equations with three unknowns (x, y, and z). Systems of equations occur naturally in many real life problems.

-ExampleConsider a nutritious drink which consists of whole egg, milk, and orange juice. 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. In order to answer that, let x be the number of eggs, y the amount of milk (in cups), and z the amount of orange of juice (in cups). Then we need to have

The task of Solving a system consists of finding the unknowns, here: x, y and z.

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. Definition. The equation ax+by+cz+dw=h where a, b, c, d, and h are known numbers, while x, y, z, and w are unknown numbers, is called a linear equation. If h =0, the linear equation is said to be homogeneous. A linear system is a set of linear equations and a homogeneous linear system is a set of homogeneous linear equations.

-Example-

and

are linear systems, while

is a nonlinear system (because of y2). The system

is an homogeneous linear system.

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. The algebraic properties of matrices may then be used to solve systems. First, consider the linear system

Set the matrices

Using matrix multiplications, we can rewrite the linear system above as the matrix equation

The matrix A is called the matrix coefficient of the linear system. The matrix C is called the nonhomogeneous term. When , the linear system is homogeneous. The matrix X is the unknown matrix. Its entries are the unknowns of the linear system. The augmented matrix associated with the system is the matrix [A|C], where

In general if the linear system has n equations with m unknowns, then the matrix coefficient will be a nxm matrix and the augmented matrix an nx(m+1) matrix.

Definition Two linear systems with n unknowns are said to be equivalent if and only if they have the same set of solutions.

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. Try to kill one of the unknowns and solve for the other two. For example, if we keep the first and second equation, and subtract the first one from the last one, we get the equivalent system

keep the first and the last equation, and subtract the first from the second.

focus on the second and the third equation. We repeat the same procedure. Try to kill one of the two unknowns (y or z). Indeed, we keep the first and second equation, and we add the second to the third after multiplying it by 3.

Going from the last equation to the first while solving for the unknowns is called backsolving.

perform some elementary row operations on this matrix. keep the first and second row, and subtract the first one from the last one

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

keep the first and the last rows, and we subtract the first from the second.

Then we keep the first and second row, and we add the second to the third after multiplying it by 3 to get

This is known as Gaussian Elimination.

Gaussian Elimination Steps Consider a linear system. Construct the augmented matrix for the system; Use elementary row operations to transform the augmented matrix into a triangular one; Write down the new linear system for which the triangular matrix is the associated augmented matrix; Solve the new system. Some parametric values need to be assigned to some unknowns, and then apply the method of back substitution to solve the new system.

-ExampleSolve the following system via Gaussian elimination

Solution The augmented matrix is

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

use elementary row operations to transform this matrix into a triangular one. Keep the first row and use it to produce all zeros elsewhere in the first column.

Keep the first and second row and try to have zeros in the second column.

Keep the first three rows. We add the last one to the third to get

This is a triangular matrix. Its associated system is

Clearly we have v = 1. Set z=s and w=t, then we have

The first equation implies Putting all together

3 1 3 = 2 + + 2 2 2

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

-TryUse Gaussian elimination to solve the linear system

Definition. A linear system is called inconsistent or overdetermined if it does not have a solution. In other words, the set of solutions is empty. Otherwise the linear system is called consistent.