DM559 Linear and Integer Programming. Lecture 6 Rank and Range. Marco Chiarandini

Similar documents
Section 1.1 System of Linear Equations. Dr. Abdulla Eid. College of Science. MATHS 211: Linear Algebra

DM559 Linear and Integer Programming. Lecture 2 Systems of Linear Equations. Marco Chiarandini

Rank and Nullity. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics

Linear Transformations

Matrices and systems of linear equations

Lecture 21: 5.6 Rank and Nullity

Solutions to Exam I MATH 304, section 6

Methods for Solving Linear Systems Part 2

Linear equations in linear algebra

Review Notes for Linear Algebra True or False Last Updated: February 22, 2010

MATH 2050 Assignment 6 Fall 2018 Due: Thursday, November 1. x + y + 2z = 2 x + y + z = c 4x + 2z = 2

Linear System Equations

Chapter 5. Linear Algebra. Sections A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Solutions of Linear system, vector and matrix equation

1 - Systems of Linear Equations

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Notes on Row Reduction

Chapter 5. Linear Algebra. Sections A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Applied Matrix Algebra Lecture Notes Section 2.2. Gerald Höhn Department of Mathematics, Kansas State University

Math 323 Exam 2 Sample Problems Solution Guide October 31, 2013

Row Space and Column Space of a Matrix

Algorithms to Compute Bases and the Rank of a Matrix

1 Systems of equations

MATRICES. knowledge on matrices Knowledge on matrix operations. Matrix as a tool of solving linear equations with two or three unknowns.

DM559 Linear and Integer Programming. Lecture 3 Matrix Operations. Marco Chiarandini

MATH 2360 REVIEW PROBLEMS

Math 2174: Practice Midterm 1

Math 54 HW 4 solutions

Lecture 2 Systems of Linear Equations and Matrices, Continued

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Row Space, Column Space, and Nullspace

1. Determine by inspection which of the following sets of vectors is linearly independent. 3 3.

SECTION 3.3. PROBLEM 22. The null space of a matrix A is: N(A) = {X : AX = 0}. Here are the calculations of AX for X = a,b,c,d, and e. =

Solving Linear Systems Using Gaussian Elimination

Linear Algebra I Lecture 10

Chapter 1: Systems of Linear Equations and Matrices

Elementary Matrices. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics

EK102 Linear Algebra PRACTICE PROBLEMS for Final Exam Spring 2016

Rank, Homogenous Systems, Linear Independence

System of Linear Equations

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Chapter 6 Page 1 of 10. Lecture Guide. Math College Algebra Chapter 6. to accompany. College Algebra by Julie Miller

MATH 213 Linear Algebra and ODEs Spring 2015 Study Sheet for Midterm Exam. Topics

DM554 Linear and Integer Programming. Lecture 9. Diagonalization. Marco Chiarandini

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

MATH 323 Linear Algebra Lecture 12: Basis of a vector space (continued). Rank and nullity of a matrix.

LECTURES 14/15: LINEAR INDEPENDENCE AND BASES

Chapter 1: Systems of Linear Equations

Math 415 Exam I. Name: Student ID: Calculators, books and notes are not allowed!

Fundamentals of Linear Algebra. Marcel B. Finan Arkansas Tech University c All Rights Reserved

The definition of a vector space (V, +, )

Ma 322 Spring Ma 322. Jan 18, 20

PH1105 Lecture Notes on Linear Algebra.

4.9 The Rank-Nullity Theorem

MATH 2331 Linear Algebra. Section 2.1 Matrix Operations. Definition: A : m n, B : n p. Example: Compute AB, if possible.

Math 2030 Assignment 5 Solutions

Daily Update. Math 290: Elementary Linear Algebra Fall 2018

Linear Algebra I Lecture 8

Review for Exam Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions.

Lecture 6 & 7. Shuanglin Shao. September 16th and 18th, 2013

Online Exercises for Linear Algebra XM511

Lecture Summaries for Linear Algebra M51A

Lecture 22: Section 4.7

SYMBOL EXPLANATION EXAMPLE

MODULE 8 Topics: Null space, range, column space, row space and rank of a matrix

Lectures on Linear Algebra for IT

2. Every linear system with the same number of equations as unknowns has a unique solution.

Linear Algebra M1 - FIB. Contents: 5. Matrices, systems of linear equations and determinants 6. Vector space 7. Linear maps 8.

Linear Algebra Exam 1 Spring 2007

EXERCISE SET 5.1. = (kx + kx + k, ky + ky + k ) = (kx + kx + 1, ky + ky + 1) = ((k + )x + 1, (k + )y + 1)

Lecture Notes in Linear Algebra

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

(I.D) Solving Linear Systems via Row-Reduction

MTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education

Topics. Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij

SSEA Math 51 Track Final Exam August 30, Problem Total Points Score

Chapter 1: Linear Equations

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

Math 315: Linear Algebra Solutions to Assignment 7

DEPARTMENT OF MATHEMATICS

Chapter 1: Linear Equations

Lecture Notes: Solving Linear Systems with Gauss Elimination

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same.

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Chapter 3. Directions: For questions 1-11 mark each statement True or False. Justify each answer.

Linear Algebra Final Exam Study Guide Solutions Fall 2012

Chapter 2 Subspaces of R n and Their Dimensions

(a) only (ii) and (iv) (b) only (ii) and (iii) (c) only (i) and (ii) (d) only (iv) (e) only (i) and (iii)

Section Gaussian Elimination

EE263: Introduction to Linear Dynamical Systems Review Session 2

Solutions to Math 51 First Exam April 21, 2011

MTH 362: Advanced Engineering Mathematics

Linear Algebra: Lecture notes from Kolman and Hill 9th edition.

Lecture 4: Gaussian Elimination and Homogeneous Equations

MTH 464: Computational Linear Algebra

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

Lecture Notes in Mathematics. Arkansas Tech University Department of Mathematics. The Basics of Linear Algebra

MTH 102A - Linear Algebra II Semester

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

Transcription:

DM559 Linear and Integer Programming Lecture 6 and Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark

Outline 1. 2. 3. 2

Outline 1. 2. 3. 3

Exercise Solve the following system of linear equations: x + z = 1 3x + 4y + z = 1 + 4y 2z = 2 det(a) = 1 4 1 4 2 + 1 3 0 1 2 = 0 Hence we cannot solve by inverse nor by Cramer s rule. We proceed by Gaussian elimination: 1 0 1 1 1 0 1 1 x = 1 t 3 4 1 1 0 1 1/2 1/2 y = 1 2 + 1 2 t, t R 0 4 2 2 0 0 0 0 z = t x y = z 1 1 1 2 + 1 2 t, t R 0 1 infinitely many solutions 4

In Python: import numpy as np r1=np.array([1,0,1]) r2=np.array([3,4,1]) r3=r2 3 r1 A=np.vstack([r1,r2,r3]) np.linalg.det(a) # 1.3322676295501906e 15 np.dot(np.linalg.inv(a), [1,1, 2]) # array([ 1., 0., 1.]) np.dot(np.linalg.inv(a),a) # array([[ 0., 0., 1.],[ 0., 1., 0.],[ 0., 0., 1.]]) np.linalg.solve(a, [1,1, 2]) # array([ 0., 0., 1.]) Hence, Python for numerical reasons does not recognize the determinant to be null and solves the system returning only one particular solution. Knoweldge of the theory of linear algebra is important to avoid mistakes! import sympy as sy or you can carry out the row operations M=sy.Matrix(A) M.rref() yourself 5

Outline 1. 2. 3. 6

Synthesis of what we have seen so far under the light of two new concepts: rank and range of a matrix We saw that: every matrix is row-equivalent to a matrix in reduced row echelon form. Definition ( of Matrix) The rank of a matrix A, rank(a), is the number of non-zero rows, or equivalently the number of leading ones in a row echelon matrix obtained from A by elementary row operations. For an m n matrix A, rank A min{m, n}, where min{m, n} denotes the smaller of the two integers m and n. 7

Example 1 2 1 1 M = 2 3 0 5 3 5 1 6 1 2 1 1 2 3 0 5 3 5 1 6 R 2 =R2 2R1 R 3 =R3 3R1 1 2 1 1 0 1 2 3 0 1 2 3 R 2 = R2 R 3 =R3 R2 1 2 1 1 0 1 2 3 0 0 0 0 rank(m) = 2 8

Extension of the main theorem Theorem If A is an n n matrix, then the following statements are equivalent: 1. A is invertible 2. Ax = b has a unique solution for any b R 3. Ax = 0 has only the trivial solution, x = 0 4. the reduced row echelon form of A is I. 5. A 0 6. the rank of A is n 9

and Systems of Linear Equations x + 2y + z = 1 2x + 3y = 5 3x + 5y + z = 4 1 2 1 1 2 3 0 5 3 5 1 4 R 2 =R2 2R1 1 2 1 1 R 3 =R3 3R1 0 1 2 3 0 1 2 1 R 2 = R2 1 2 1 1 R 3 =R3 R2 0 1 2 3 0 0 0 2 x + 2y + z = 1 x + 2z = 3 0x + 0y + 0z = 2 It is inconsistent! The last row is of the type 0 = a, a 0, that is, the augmenting matrix has a leading one in the last column rank(a) = 2 rank(a b) = 3 1. A system Ax = b is consistent if and only if the rank of the augmented matrix is precisely the same as the rank of the matrix A. 10

2. If an m n matrix A has rank m, the system of linear equations, Ax = b, will be consistent for all b R n Since A has rank m then there is a leading one in every row. Hence [A b] cannot have a row [0, 0,..., 0, 1] = rank A rank(a b) [A b] has also m rows = rank(a) rank(a b) Hence, rank(a) = rank(a b) Example 1 2 1 1 1 0 3 0 B = 2 3 0 5 0 1 2 0 rank(b) = 3 3 5 1 4 0 0 0 1 Any system Bx = d in 4 unknowns and 3 equalities with d R 3 is consistent. Since rank(a) is smaller than the number of variables, then there is a non-leading variable. Hence infinitely many solutions! 11

Example 1 3 2 0 0 0 1 3 0 4 0 28 [A b] = 0 0 1 2 3 1 0 0 0 0 1 5 0 0 1 2 0 14 0 0 0 0 1 5 0 0 0 0 0 0 0 0 0 0 0 0 rank([a b]) = 3 < 5 = n x 1 + 3x 2 + 4x 4 = 28 x 3 + 2x 4 = 14 x 5 = 5 x 1, x 3, x 5 are leading variables; x 2, x 4 are non-leading variables (set them to s, t R) x 1 = 28 3s 4t x 1 28 3 4 x 2 = s x 2 x 3 = 14 2t x = x 3 x 4 = t x 4 = 0 14 0 + 1 0 0 s + 0 2 1 t x 5 = 5 x 5 5 0 0 12

Summary Let Ax = b be a general linear system in n variables and m equations: If rank(a) = r < m and rank(a b) = r + 1 then the system is inconsistent. (the row echelon form of the augmented matrix has a row [0 0... 0 1]) If rank(a) = r = rank(a b) then the system is consistent and there are n r free variables; if r < n there are infinitely many solutions, if r = n there are no free variables and the solution is unique Let Ax = 0 be an homogeneous system in n variables and m equations, rank(a) = r (always consistent): if r < n there are infinitely many solutions, if r = n there are no free variables and the solution is unique, x = 0. 13

General solutions in vector notation Example x = x 1 x 2 x 2 x 4 x 5 28 3 4 = 0 14 0 + 1 0 0 s + 0 2 1 t, 5 0 0 s, t R For Ax = b: x = p + α 1 v 1 + α 2 v 2 + + α n r v n r, α i R, i = 1,..., n r Note: if α i = 0, i = 1,..., n r then Ap = b, ie, p is a particular solution if α 1 = 1 and α i = 0, i = 2,..., n r then A(p + v 1 ) = b Ap + Av 1 = b Ap=b Av 1 = 0 14

Thus (recall that x = p + z, z N(A)): If A is an m n matrix of rank r, the general solutions of Ax = b is the sum of: a particular solution p of the system Ax = b and a linear combination α 1v 1 + α 2v 2 + + α n r v n r of solutions v 1, v 2,, v n r of the homogeneous system Ax = 0 If A has rank n, then Ax = 0 only has the solution x = 0 and so Ax = b has a unique solution: p 15

Outline 1. 2. 3. 16

Definition ( of a matrix) Let A be an m n matrix, the range of A, denoted by R(A), is the subset of R m given by R(A) = {Ax x R n } That is, the range is the set of all vectors y R m of the form y = Ax for some x R n, or all y R m for which the system Ax = y is consistent. 17

Recall, if x = (α 1, α 2,..., α n ) T is any vector in R n and a 11 a 12 a 1n a 21 a 22 a 2n A =........ a m1 a m2 a mn a 1i a 2i a i =, i = 1,..., n.. a mi Then A = [ a 1 a 2 a n ] and Ax = α 1 a 1 + α 2 a 2 +... + α n a n that is, vector Ax in R n as a linear combination of the column vectors of A Hence R(A) is the set of all linear combinations of the columns of A. the range is also called the column space of A: R(A) = {α 1 a 1 + α 2 a 2 +... + α n a n α 1, α 2,..., α n R} Thus, Ax = b is consistent iff b is in the range of A, ie, a linear combination of the columns of A 18

Example 1 2 A = 1 3 2 1 Then, for x = [α 1, α 2 ] T so 1 2 [ ] α 1 + 2α 2 1 2 Ax = 1 3 α1 = α α 1 + 3α 2 = 1 α 1 + 3 α 2 2 1 2 2α 1 + α 2 2 1 R(A) = α 1 + 2α 2 α 1 + 3α 2 2α 1 + α 2 α 1, α 2 R 19

Example x + 2y = 0 x + 3y = 5 2x + y = 3 x + 2y = 1 x + 3y = 5 2x + y = 2 1 2 [ 0 Ax = 1 3 2 = 5 1] 2 1 3 0 1 2 5 = 2 1 3 = 2a 1 a 2 3 2 1 Ax = 0 has only the trivial solution x = 0. (Why?) Only way: 0 1 1 2 + 0 2 3 = 0a 1 + 0a 2 = 0 1 Hence no way to express [1, 5, 2] as linear expression of the two columns of A. 20