Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Linear Algebra Lecture Notes

Linear Algebra Lecture Notes

Published by Fairuz Shohaimay, 2019-08-11 07:23:40

Description: Compilation of Lecture Notes for Linear Algebra I
Intended for use by CS110 and CS111 UiTM Kampus Raub only

Search

Read the Text Version

LINEAR ALGEBRA LECTURE NOTES Prepared by Mazura Mokhtar & Fairuz Shohaimay



Linear Algebra Lecture Notes 2019 Edition Prepared by Mazura Mokthtar and Fairuz Shohaimay This book is intended for use by CS110 and CS111 students in UiTM Raub Campus only

ii

CONTENTS iv Notes 1 Chapter 1: Matrices 2 3 1.1 Introduction to Matrices 7 1.2 Types of Matrices 1.3 Basic Operations on Matrices 11 1.4 Properties of Matrix Operations 16 38 Chapter 2: System of Linear Equations 51 2.1 Introduction to System of Linear Equations 2.2 Methods to Solve System of Linear Equations 65 2.3 Inverse of a Matrix 67 2.4 Elementary Matrices 73 79 Chapter 3: Determinants 85 3.1 Introduction to Determinants 3.2 Evaluating Determinants by using Cofactor Expansion 91 3.3 Evaluating Determinants by Row or Column Operations 102 3.4 Properties of Determinants 107 3.4 Application of Determinants 111 126 Chapter 4: Vector Spaces 133 4.1 Vectors in ������\" 4.2 Real Vector Spaces 142 4.3 Subspaces 152 4.4 Spanning Set and Linear Independence 159 4.5 Basis and Dimension 166 4.6 Row Space, Column Space, Rank, Nullspace, and Nullity 170 Chapter 5: Linear Transformation 183 5.1 Introduction to Linear Transformation 5.2 Kernel and Range 5.3 One to One and Onto Transformations 5.4 Inverse of a Linear Transformation Chapter 6: Eigenvalues and Eigenvectors 6.1 Introduction to Eigenvalues and Eigenvectors 6.2 Diagonalization iii

Notes iv

CHAPTER 1: MATRICES 1.1 Introduction to Matrices 1. A matrix is a rectangular array of numbers in rows and columns. 2. A matrix can be denoted by capital letters such as ������, ������, ������, … 3. The numbers in matrix are called entries, and they can be denoted by small letters such as ������, ������, ������, ������, … 4. The size of a matrix is determined by the number of rows and columns that occur in the matrix. Example 1.1 6 95, and ������ = 4−267 Let ������ = +������������ ������������,, ������ = +20 −3 4 7 a) The matrix ������ has 2 rows and 2 columns. Its entries are ������, ������, ������, and ������. Its size is 2 by 2 (written: 2 × 2). b) B is a _____________ matrix. c) C is a _____________ matrix. 5. In general, a matrix ������ with ������ rows and ������ columns can be written as follows. ������;; ������;< ������;= ⋯ ������;? ������ = 4 ������<; ������<< ������<= ⋱ ������<? ⋮ ⋮ 7 ������B; ������B< ������B= ⋯ ������B? ������CD: entry in the ������-th row and ������-th column. Example 1.2 ������;; ������;< a) 3 × 2 matrix can be written as ������ = H������<; ������<<J. ������=< ������=; b) 2 × 4 matrix ������ = K������������<;;; ������;< ������;= ������������;<LLM. ������<< ������<= c) 1 × 3 matrix ������ = (������;; ������;< ������;=). 1

1.2 Types of Matrices 6. Column matrix (or, column vector): A matrix that has only one column. 1 b) +35, a) 4237 4 7. Row matrix (or, row vector): A matrix that has only one row. a) (4 3 2 1) b) (2 7) 8. Zero matrix: A matrix consisting of entries of zeros. a) ������ = +00 00, b) ������ = (0 0 0) 9. Square matrix: matrix with the same number of rows and columns. An n x n matrix is known as a matrix of order n. 172 b) +32 −81, a) H4 5 ������J 9 −1 0 Consider ������;; ������;< ⋯ ������;? ������ = T .. ������<. < ⋯⋯ .. V ������?; ������?< ⋯ ������?? The entries ������CD of a square matrix A for which ������ = ������ form the main diagonal of ������ (that is, ������;;, ������<<, … , ������??). 10. Diagonal matrix: A square matrix where every element not on the main diagonal is zero. 10 0 b) +20 80, a) H0 5 0 J 0 0 −3 2

11. Identity matrix: A diagonal matrix where each entry in the main diagonal is 1. An ������ × ������ identity matrix can be denoted as In. 10…00 ������? = ⎛⎜0⋮ 1 ⋮ 0 0⋮ ⎟⎞ a) ������< = +01 10, b) ⋮ ⋱ ⋮ 00…10 ⎝0 0 … 0 1⎠ 12. Upper triangular matrix: A square matrix where every entry below the main diagonal is zero. ������;; ������;< ������;= H 0 ������<< ������<=J 0 0 ������== 13. Lower triangular matrix: A square matrix where each entry above the main diagonal is zero. ������;; 0 0 H������<; ������<< 0 J ������=; ������=< ������== 1.3 Basic Operations on Matrices 1. Equality of matrices: Two matrices ������ and ������ are equal, ������ = ������, if they have the same size and their corresponding entries are equal. Formally, an ������ × ������ matrix ������ is equal to ������ × ������ matrix ������ if and only if ������ = ������, ������ = ������, and ������CD = ������CD for all ������ and ������. Example 1.3 Consider the following matrices ������, ������ and ������. ������ = +32 ���1���, ������ = +32 15, ������ = +23 1 00, 5 ������ = ������, then ������ = Matrix ������ ≠ ������ for other values of x. The matrix ������ ≠ ������ since ������ and ������ have different sizes. 3

2. Sum of matrices: Let ������ and ������ be matrices with same sizes. The sum of ������ and ������, written ������ + ������ is obtained by adding corresponding entries of ������ and ������. ������ + ������ = c������CD + ������CDd ������;< + ������;< ⋯ ������;? + ������;? ������<< +⋯������<< ⋯ ������<? + ������<? ������;; + ������;; ������B< + ������B< ⋯ ⋯ 7 = 4 ������<;⋯+ ������<; ⋯ ������B? + ������B? ������B; + ������B; Example 1.4 2 4 −6 0 16 Suppose matrix ������ = H 1 3 2 J and matrix ������ = H 2 3 4J. −4 3 −5 −2 1 4 a) ������ + ������ = b) ������ + ������ = 3. Scalar multiplication: Let ������ be a matrix and ������ be a scalar. Then the scalar multiple ������������ is the matrix obtained by multiplying each entry of ������ with ������. Example 1.5 Suppose matrix ������ = +12 3 41, and matrix ������ = +39 −06,. 3 a) 2������ = b) ; ������ = = 4

4. Difference of matrices a) The negative of matrix ������, written −������, is the matrix (−1)������. b) Let ������ and ������ be matrices with the same sizes. The difference of ������ and ������, written ������ − ������, is the matrix ������ given by ������ = ������ + (−������). ������ − ������ = c������CD − ������CDd ������;< − ������;< ⋯ ������;? − ������;? ������<< −⋯������<< ⋯ ������<? − ������<? ������;; − ������;; ������B< − ������B< ⋯ ⋯ 7 = 4 ������<;⋯− ������<; ⋯ ������B? − ������B? ������B; − ������B; Example 1.6 2 4 −6 0 16 Suppose matrix ������ = H 1 3 2 J and matrix ������ = H 2 3 4J. −4 3 −5 −2 1 4 a) ������ − ������ = b) ������ − ������ = 5

5. Matrix multiplication: If ������ = e������CDf is an ������ × ������ matrix and ������ = e������CDf is an ������ × ������ matrix, then the product ������������ is an ������ × ������ matrix such that ������������ = e������CDf where ������CD = ∑?hi; ������Ch������hD = ������C;������;D + ������C<������<D + ������C=������=D + ⋯ + ������C?������?D. Note: ������B×? × ������?×j = ������������B×j Example 1.7 Suppose matrix ������ = +12 2 04, and matrix ������ = 4 1 4 3 6 H0 −1 3 1J 7 5 2 2 a) ������������ = b) ������������ = 6

1.4 Properties of Matrix Operations 1. Theorem: If ������, ������, and ������ are ������ × ������ matrices and ������ and ������ are scalars, then these properties are true. a) ������ + ������ = ������ + ������ b) ������ + (������ + ������) = (������ + ������) + ������ c) (������������)������ = ������(������������) = ������(������������) d) 1������ = ������ e) ������(������ + ������) = ������������ + ������������ f) (������ + ������)������ = ������������ + ������������ 2. Theorem: If ������, ������, and ������ are matrices (with sizes such that matrix products are defined) and ������ is a scalar, then the following properties are true. a) ������(������������) = (������������)������ b) ������(������ + ������) = ������������ + ������������ c) (������ + ������)������ = ������������ + ������������ d) ������(������������) = (������������)������ = ������(������������) = ������������������ 3. Each of the following statements is valid for any matrices ������, ������, and ������ for which the indicated operations are defined. a) ������������ ≠ ������������ b) If ������ = 0 or ������ = 0, then ������������ = 0. But conversely, ������������ = 0 does not imply ������ = 0 or ������ = 0. c) If ������������ = ������������, it does not imply ������ = ������, that is cancellation law is not valid in matrix multiplication. Example 1.8 Given that the matrix ������ = +12 21, , ������ = +−11 −11, and ������ = +−33 −33,. a) The product ������������ = Note that ������ ≠ 0 or ������ ≠ 0. b) The product ������������ = Note that ������������ = ������������ but ������ ≠ ������. 7

4. Properties of identity matrix: If ������ is an ������ × ������ matrix, then the following properties are true. a) ������ × ������? = ������ b) ������B × ������ = ������ 5. Powers of a matrix: Let ������ be a square matrix. Then ������; = ������, ������k = ������, ������? = ������������������ … ������ (������ factors) Example 1.9 Suppose ������ = +31 42,. 24, = Then, ������< = +13 42, +31 ������������< = ������<������ = ������������������ = ������������< = ������<������. Hence, we can define ������= = ������������������ and ������? = ������������������ … ������. Example 1.10 Consider a diagonal matrix ������ = +���0��� ���0���,. ������< = Hence, it can be shown that ������h = K���0���h 0 M, for ������ ≥ 1. ������h 8

6. Transpose of a matrix: The transpose of an ������ × ������ matrix A, written ������o (or ������p), is the ������ × ������ matrix whose ������-th column is the ������-th row of A. Example 1.11 ������ ������ ������ For the matrix ������ = q������ ������ ������u. ������ ℎ ������ ������o = 7. Properties of Transpose: If ������ and ������ are matrices (with sizes such that the matrix operations are defined) and ������ is a scalar, then the following properties are true. a) (������o)o = ������ b) (������ + ������)o = ������o + ������o c) (������������)o = ������(������o) d) (������������)o = ������o������o e) ������ = ������o, then ������ is symmetric. Example 1.12 Let ������ = +13 24, and ������ = +13 42,. a) (������o)o = b) (������������)o = 9

c) (������ + ������)o = d) ������o + ������o = e) (������������)o = f) ������o������o = 10

CHAPTER 2: SYSTEMS OF LINEAR EQUATIONS 2.1 Introduction to Systems of Linear Equations 1. A linear equation in ������ variables ������#������# + ������&������& + ������'������' + ⋯ + ������)������) = ������ ������#, ������&, ������', . . . , ������) are coefficients ������#, ������&, ������', . . . , ������) are variables ������ is the constant 2. A system of linear equations is a group of more than one linear equation. 3. A general system of linear equations with ������ equations and ������ variables can be written as ������##������# + ������#&������& + ������#'������' + ⋯ + ������#)������) = ������# ������&#������# + ������&&������& + ������&'������' + ⋯ + ������&)������) = ������& ������'#������# + ������'&������& + ������''������' + ⋯ + ������')������) = ������' ⋮ ⋮ ⋮ ⋮ = ⋮ ������1#������# + ������1&������& + ������1'������' + ⋯ + ������1)������) = ������1 ������23 is the coefficient of the variable ������3 in the ������56 equation. ������2 is the constant of the ������56 equation. 4. Every system of linear equations has either no solutions, exactly one solution, or infinitely many solutions. y yy x xx No solution Inconsistent One solution Infinitely many solution Consistent 11

5. Augmented matrix: A matrix of numbers in which each row represents the constants from one equation and each column represents all the coefficients for a single variable. Systems of ������##������# + ������#&������& + ������#'������' + ⋯ + ������#)������) = ������# Linear ������&#������# + ������&&������& + ������&'������' + ⋯ + ������&)������) = ������& ������'#������# + ������'&������& + ������''������' + ⋯ + ������')������) = ������' Equations ⋯ ������1#������# + ������1&������& + ������1'������' + ⋯ + ������1)������) = ������1 ������������ = ������ Matrix ������## ������#& ������#' ⋯ ������#) ������# ������# Equation ������&# ������&& ������&' ⋯ ������&) ⎜⎛������������.'& ������& ⎛ ������'# ������'& ������'' ⋯ ������') ⎞ ⎞ = ⎛ ������' ⎞ ⎜ ⋱ ⎟ ⎟ ⎜ . ⎟ ⋮ ⋮ ⋮ ⋮ ⎝������1# ������1& ������1' ⋯ ������1)⎠ ⎝������)⎠ ⎝������1⎠ ������## ������#& ������#' ⋯ ������#) ������# ������&# ������&& ������&' ⋯ ������&) ������& Augmented ⎛ ������'# ������'& ������'' ⋯ ������') A ������' ⎞ Matrix ⎜ ⋱ A . ⎟ ⋮ ⋮ ⋮ ⋮ ⎝������1# ������1& ������1' ⋯ ������1) ������1⎠ Find the augmented matrix for each of the following system of linear equations. a) ������ − 2������ + 3������ = 7 2������ + ������ + ������ = 4 −3������ + 2������ − 2������ = −10 b) ������ + 2������ − 4������ = 5 −������ − ������ + 6������ = −6 2������ − 12������ = 9 c) 3������# − 6������& = 9 4������# − 8������& = 12 −2������# + 4������& = −6 12

6. Elementary Row Operations Notations Operations ������2 ↔ ������3 ������������2 → ������2 Interchange ������56 row with ������56 row ������3 + ������������2 → ������3 Multiply ������56 row with a nonzero constant ������ Multiply ������56 row with a nonzero constant ������ and adding it to ������56 row Note: This changes the ������56 row a) Interchanging first row with the second row. U11 1 24V −1 b) Multiply the first row with '#. 3 −6 9 W 4 −8 12X −2 4 −6 c) Multiplying the first row with -2 and adding it to the third row. 1 2 −4 5 W−1 −1 6 −6X 2 0 12 9 13

7. Row Echelon Form (REF): A matrix is said to be in row echelon form if it satisfies the following conditions. a) Any row which contains all zero entries is below the rows having non-zero entry. b) The first non-zero element in each row, called the leading entry is 1. c) Each leading entry is in a column to the right of the leading entry in the previous row. Which of the following matrices are in row echelon form? a) U10 1 23V b) U10 2 32V 1012 0 1 c) W0 1 1 1X 0001 −1 0 2 0 1000 f) U10 1 13V d) W 0 1 0 0X e) W0 0 0 0X 0 0 001 0101 Using elementary row operation, reduce the following matrices to row echelon form. a) U41 1 111V −3 1 1 1 b) W2 3 7 X 1 3 −2 14

8. Reduced Row Echelon Form (RREF): A matrix is said to be in reduced row echelon form if it satisfies the following conditions. a) The matrix satisfies conditions for a row echelon form. b) Each column that contains a leading 1 has zeros everywhere. Which of the following matrices are in reduced row echelon form? a) U01 0 0 20V 00100 1012 1 2 b) W0 0 0 1 0X c) W0 1 1 1X 00012 0001 1020 1000 f) U01 0 − 53V d) W0 1 0 0X e) W0 0 0 0X 1 0001 0101 Using elementary row operation, reduce the following matrices to reduced row echelon form. 012 a) W1 2 1X 278 0 −1 0 b) W2 0 1X 0 1 1 15

2.2 Methods to Solve a System of Linear Equations 1. Gaussian Elimination Method: The procedure for reducing a matrix to a REF by performing ERO. Write the given system of linear equations as an augmented matrix. Perform the EROs to put the matrix into REF. Convert the matrix back into a system of linear equations Use back substitution to obtain all the answers. Consistent or Inconsistent System? a) 1 0 0 1 W0 1 0Y5X 0 0 12 b) 1 0 0 4 W0 1 0Y7X 0 0 02 c) 1 0 0 2 W0 1 0Y2X 0 0 00 16

Solve ������ − ������ + ������ = −4 2������ − 3������ + 4������ = −15 5������ + ������ − 2������ = 12 17

Solve ������# + ������& + 2������' = 9 2������# + 4������& − 3������' = 1 3������# + 6������& − 5������' = 0 18

Solve ������ + 2������ − ������ = 3 2������ − ������ + 2������ = 6 ������ − 3������ + 3������ = 4 19

Solve 3������# − 3������& − 6������' = −3 2������# − 2������& − 4������' = −2 −2������# + 3������& + ������' = 7 20

Solve the given system of linear equations by using Gaussian elimination method. ������ + 2������ − 3������ = 0 2������ + 4������ − 2������ = 2 3������ + 6������ − 4������ = 3 21

Solve the given system of linear equations by using Gaussian elimination method. ������# + ������& = 2 2������# + 4������& = 9 ������# + 5������& = 12 22

Solve the given system of linear equations by using Gaussian elimination method. ������# + 2������& − 2������Z + 4������[ = 1 2������# − ������' − ������Z + ������[ = 4 ������# + ������& − ������Z + 2������[ = 0 23

2. Gauss-Jordan Elimination Method: The procedure for reducing a matrix to a RREF by performing ERO. Write the given system of linear equations as an augmented matrix. Perform the EROs to put the matrix into RREF. Convert the matrix back into a system of linear equations Use back substitution to obtain all the answers. Note: Every matrix has a unique reduced row echelon form. a) Solve ������ − 2������ + 3������ = 9 −������ + 3������ = −4 2������ − 5������ + 5������ = 17 24

b) Solve 2������# + 4������& − 2������' = 0 3������# + 5������& = 1 c) Solve 3������ + 3������ = 9 2������ + 3������ + ������ = 6 ������ − ������ = 1 25

Solve the given system of linear equations by using Gauss-Jordan elimination method. ������ + ������ + 3������ = 1 2������ + 3������ − ������ = 3 5������ + 7������ + ������ = 7 26

Solve the given system of linear equations by using Gauss-Jordan elimination method. ������# + 3������& + ������' = 3 2������# + 8������& + 5������' = 10 ������# + 7������& + 7������' = 11 3������# + 11������& + 7������' = 15 27

Solve the given system of linear equations by using Gauss-Jordan elimination method. ������# − 2������& + 4������' = 2 2������# − 3������& + 5������' = 3 3������# − 4������& + 6������' = 7 28

3. The following figure summarizes the steps to determine the types of solution for a system of linear equations. Write the given system Reduce to REF 1 ⋯ ∗∗ of linear equations in its or RREF using W0 ∗ ∗Y∗X augmented matrix form. ERO. 0 ⋯ ������ ������ Look at the last row. Unique solution Infinitely many No solution (0 ⋯ ������ ≠ 0|������ ∈ ������) solutions (0 ⋯ ������ = 0|������ ≠ 0) (0 ⋯ ������ = 0|������ = 0) Consider the following system of linear equations. ������ − 2������ = 1 ������ − ������ + ������������ = 2 ������������ + 4������ = ������ Find all possible value of ������ and ������ so that the system has a) a unique solution b) infinitely many solution c) no solution 29

Consider the following system of linear equations. ������ + ������ + ������������ = 1 ������ + ������������ + ������ = 4 ������������ + ������ + ������ = ������ Find all possible value of ������ and ������ so that the system has a) a unique solution b) infinitely many solution c) no solution 30

Consider the following system of linear equations. ������ + 2������ + ������ = 3 ������������ + 5������ = 10 (������& − 2������ − 15)������ = ������������ − 6������ − 30 Find all possible value of ������ and ������ so that the system has a) a unique solution b) infinitely many solution c) no solution 31

SUMMARY Set up the system in form ������������ = ������ Write the augmented matrix (������|������) Reduced the augmented matrix System has infinitely many solution Is there a row (0 0 ⋯ 0|������),������ ≠ 0? NO NO YES Is there one pivot System has no solution per column? YES System has one solution 32

4. Homogeneous System of Linear Equations: A system of linear equations is homogeneous if the constant terms are all zero. 2������ + 3������ + ������ = 0 4������ + ������ + ������ = 0 ������ − ������ − 2������ = 0 3������ − 2������ + 3������ = 0 Homogeneous System 2������ − ������ − ������ = 2 Non-homogeneous System a) Every homogeneous system of linear equations is always consistent. b) For a homogeneous system, exactly one of the following is true. • The system has only trivial solution. • The system has infinitely many nontrivial solutions in addition to the trivial solution c) If the homogeneous system has fewer equations than variables, then it must have an infinite number of solutions. Solve the following homogeneous system of linear equations. ������ − 2������ + 8������ = 0 3������ + 2������ = 0 −������ + ������ + 7������ = 0 33

Solve the following homogeneous system of linear equations. ������# + 3������& + 5������' = 0 ������# + 4������& + 2������' = 0 34

Solve the following homogeneous system of linear equations. ������ − ������ + 2������ = 0 2������ + ������ + ������ = 0 5������ + ������ + 4������ = 0 35

Solve the following homogeneous system of linear equations. 2������# − 4������& + 3������' − ������Z + 2������[ = 0 3������# − 6������& + 5������' − 2������Z + 4������[ = 0 5������# − 10������& + 7������' − 3������Z + 4������[ = 0 36

OVERVIEW System of Linear Equations Non-homogenous Homogenous system system Consistent Inconsistent Trivial (unique) Nontrivial solution (infinitely many) solution(s) Unique solution Infinitely many No solution solutions 37

2.3 Inverse of a Matrix 1. An ������ × ������ square matrix ������ is called invertible or non-singular if there exists an ������ × ������ matrix ������ such that ������������ = ������������ = ������) where ������) is an identity matrix and the matrix ������ is called the inverse of ������ denoted by ������j#. Notes: a) If there exists no such matrix ������, then ������ is called singular or non-invertible. b) If ������ is an invertible matrix, then its inverse is unique. Determine whether matrix ������ is the inverse of matrix ������. ������ = U−−21 35V, ������ = U52 −−13V ������������ = U−−12 35V U52 −−13V = k((−−21 × 5) + (3 × 2) (−1 × −3) + (3 × −−11))l × 5) + (5 × 2) (−2 × −3) + (5 × = U−−105 + 6 3 − 35V + 10 6 − = U10 10V Therefore, ������ is the inverse of ������. 38

Determine whether matrix ������ is the inverse of matrix ������. a) ������ = U31 72V, ������ = U− 37 − 12V 231 −1 1 0 b) ������ = W3 3 1X, ������ = W−1 0 1 X 241 6 −2 −3 39

2. Finding the Inverse of a ������ × ������ Matrix: Suppose ������ = U������������ ������������V. Then the inverse of ������ is ������j# = ������������ 1 ������������ U− ������������ −������������V for ������������ − ������������ ≠ 0 − If ������������ − ������������ = 0, then ������ is singular or not invertible. Find ������j# for given matrix if the matrix is invertible. ������ = U−−12 53V Find ������j# for given matrix if the matrix is invertible. a) ������ = U21 − 41V 40

b) ������ = U− 12 − 21V c) ������ = U75 34V 41

3. Finding the Inverse of any Matrix, ������������������������ •Form the augmented matrix, ������ ������ 1 •Transform the augmented matrix to the matrix in 2 RREF via ERO. •If ������ can be reduced to ������, then the matrix on the right side is ������j#. 3 •If ������ cannot be reduced to ������, then ������ is not invertible. 1 2 −1 Find the inverse of the matrix ������ = W 2 5 1X. −1 −2 2 42

1 4 −4 Find the inverse of the matrix ������ = W1 5 −1X if it exists. 3 13 −9 43

Find the inverse of the following matrix if it exists. 112 ������ = W1 2 5X 137 44


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook