guc - spring 2012 1math.guc.edu.eg/math201/lectures/lec 4/lec 4.pdf · guc - spring 2012 22 example...
TRANSCRIPT
GUC - Spring 2012 1
GUC - Spring 2012 2
Lecture 4Linear Algebra ( I )
Matrices & Determinants
GUC - Spring 2012 3
• To understand the concept of matrices consider the following case:
• An inventory of T-shirts for one department of a large store.
• The T-shirt comes in three different sizes and five colors,
• and each evening, the department’s supervisor prepares an inventory report for management.
• The supervisor can use the following form of report .
GUC - Spring 2012 4
This form is called a matrix form
GUC - Spring 2012 5
Definition
• A matrix is a rectangular array of elements
• arranged in a horizontal rows
• and vertical columns.
GUC - Spring 2012 6
For Example
• The matrix L has 3 rows and 2 columns; • so it is said to have order (3 × 2). • M has order (3 × 3),• The entries of a matrix are called elements
GUC - Spring 2012 7
Square Matrix
• A matrix is square if it has the same number of rows as columns.
• E.g.
GUC - Spring 2012 8
Column Matrix
• a column matrix consists only of a single column.
• E.g.
GUC - Spring 2012 9
Row Matrix
• a row matrix consists only of a single row.
• E.g. [ ]501 −
GUC - Spring 2012 10
Diagonal Matrix
• Diagonal matrix is the matrix such that all the off-diagonal element are zero.
• E.g.
GUC - Spring 2012 11
Equal Matrices
• Two matrices are equal if they have the same order and if their corresponding elements are equal.
GUC - Spring 2012 12
Sum of two Matrices
• The sum of two matrices of the same order is a matrix obtained by adding together the corresponding elements of the original two matrices.
GUC - Spring 2012 13
Example 1
GUC - Spring 2012 14
Example 2
• The following matrices can not be added together.
GUC - Spring 2012 15
Theorem 1
• If matrices A, B, and C all have the same order, then
• (a) the commutative law of addition holds; • that is, A + B = B + A
• (b) the associative law of addition holds; • that is, A + (B + C) = (A + B) + C.
GUC - Spring 2012 16
Scalar Multiplication
• The product of a scalar t by a matrix A is the matrix obtained by multiplying every element of A by t.
GUC - Spring 2012 17
Example 3
GUC - Spring 2012 18
Example 4
• Find 5A − ½ B if,
GUC - Spring 2012 19
Example 4_ Solution
GUC - Spring 2012 20
Matrix Multiplication
• The product of two matrices of two matrices AB is defined:
• if the number of columns of A equals the number of rows of B.
GUC - Spring 2012 21
Matrix Multiplication
• The result will be a matrix having the same number of rows as A and the same number of columns as B
GUC - Spring 2012 22
Example 5
• Consider the two matrices
• Since A is 2×2 and B is 2×3, then• the product AB is defined, • But the product BA is not.
GUC - Spring 2012 23
Matrix Multiplication
• In particular, let C be the 2 × 3 matrix representing the product AB.
• Thus, C has the form
GUC - Spring 2012 24
• The value of c11is computed by• multiplying each element of row
number 1 of A• by the corresponding element of column
number 1 in B, • and then adding up the products.• That is c11 = (1)(4) + (2)(-1) = 2.
GUC - Spring 2012 25
• The value of c12 is computed by• adding up the products resulting from
• multiplying each element in row number 1 of A• by the corresponding element of column
number 2 of B.
• Thus, c12 = (1)(5) + (2)(0) = 5
GUC - Spring 2012 26
In general
• the value of cIJ is computed by
• adding up the products resulting from•• multiplying each element in row number I of A
• by the corresponding element of column number J of B
GUC - Spring 2012 27
GUC - Spring 2012 28
Example 6
• Find the following (If defined)• AB • BA• Where,
GUC - Spring 2012 29
AB• Since the number of columns of A equals
• the number of rows of B which is 3
• then AB is defined and
• It will be a 2X3 Matrix • (number of rows of A and columns of B)
GUC - Spring 2012 30
AB
GUC - Spring 2012 31
BA
• The number of columns of B is 3,
• while the number of rows of A is 2.
• This implies that BA is not defined.
GUC - Spring 2012 32
Practice Problem
• Given,
GUC - Spring 2012 33
Practice Problem• Find (if defined),
• A + B
• 4A − 2C
• DE
• EB
GUC - Spring 2012 34
Determinants
• Determinants are defined only for square matrices.
• we use det(A) or |A| to designate the determinant of A.
• For Example
• which is defined as the scalar ad − bc
GUC - Spring 2012 35
Example
• If
• Then
GUC - Spring 2012 36
Minor of a Matrix
• A minor of a matrix A is the determinant of any square submatrix of A.
GUC - Spring 2012 37
Cofactor of the element aIJ
• If A = [aIJ] is a square matrix, • then the cofactor of the element aiJ in a
square matrix A • is the product of (−1)i+j with the minor
obtained from A by deleting its ith row and jth column
GUC - Spring 2012 38
Cofactor of the element a21
• To find the cofactor of the element 4 in the matrix A, we note that
• “4” appears in the row number 2 ( i = 2)
• and the column number 1 ( j = 1),
• hence (−1)i+j = (−1)3 = −1.
GUC - Spring 2012 39
• The submatrix of A obtained by deleting the second element and first column is
• which has a determinant equal to (2)(9)−(3)(8) = −6.
• The cofactor of 4 is (−1)(−6) = 6.
GUC - Spring 2012 40
How to find the determinant of any square matrix
• Step 1. Pick any one row or any one column of the matrix.
• Step 2. Calculate the cofactor of each element in the row or column selected.
• Step 3. Multiply each element in the selected row (or column) by its cofactor
• Step 4. Sum the results.
GUC - Spring 2012 41
Example
• Find det(A) for
GUC - Spring 2012 42
Solution
= 3(8 − (−6)) + 5(−1)(−4 − 3) + 0 = 77
GUC - Spring 2012 43
Example
• Find det(A) for
GUC - Spring 2012 44
Solution• Using the first row and considering the
periodicity of the sign rule, we get
GUC - Spring 2012 45
A Photo to Respect