Cs130 day02

Page 1

Solving Linear Systems

The Inverse of a Matrix

CS 130: Mathematical Methods in Computer Science Linear Systems and Matrices Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman nshernandez@dcs.upd.edu.ph Day 2


Solving Linear Systems

The Inverse of a Matrix

Linear Equations and Matrices

Solving Linear Systems

The Inverse of a Matrix


Solving Linear Systems

The Inverse of a Matrix

Linear Systems and Matrices

Solving Linear Systems

The Inverse of a Matrix


Solving Linear Systems

The Inverse of a Matrix

Exercises Solve the ff. linear systems: 1.

x 2x 3x

+ −

2.

x 2x 2x x

+ y + 5y + y − 3y

3. x x x

2y y

+ 2y + 3y

+ + −

3z z z

+ 2z − z − z + 2z + 3z + 5z − z

= = =

9 8 3

− 5w − 9w + 3w + 7w + 4w + 7w − 2w

= 3 = −3 = −11 = −5 = 5 = 11 = −6


Solving Linear Systems

The Inverse of a Matrix

Partial Solution to Exercises The reduced row echelon form of the corresponding augmented matrices of the linear systems are: 

1 1.  0 0

0 1 0

0 0 1

 2 −1  3

 2 −5 −3 2   −2 3  0 0

 −1 −2 0 2 3 0  0 0 1

1 0 0  0 1 0 2.   0 0 1 0 0 0 1 0 3.  0 1 0 0


Solving Linear Systems

The Inverse of a Matrix

(R)REF and the Rank of a Matrix The reduced row echelon form(RREF) of a matrix is unique.


Solving Linear Systems

The Inverse of a Matrix

(R)REF and the Rank of a Matrix The reduced row echelon form(RREF) of a matrix is unique. BUT this is not true for row echelon forms(REF).


Solving Linear Systems

The Inverse of a Matrix

(R)REF and the Rank of a Matrix The reduced row echelon form(RREF) of a matrix is unique. BUT this is not true for row echelon forms(REF). HOWEVER, the number of leading 1’s must be the same for each of these REFs.


Solving Linear Systems

The Inverse of a Matrix

(R)REF and the Rank of a Matrix The reduced row echelon form(RREF) of a matrix is unique. BUT this is not true for row echelon forms(REF). HOWEVER, the number of leading 1’s must be the same for each of these REFs. The number of leading 1’s in a row echelon form of a matrix A is called the rank of A and is denoted rank A.


Solving Linear Systems

The Inverse of a Matrix

(R)REF and the Rank of a Matrix The reduced row echelon form(RREF) of a matrix is unique. BUT this is not true for row echelon forms(REF). HOWEVER, the number of leading 1’s must be the same for each of these REFs. The number of leading 1’s in a row echelon form of a matrix A is called the rank of A and is denoted rank A.

Note: Suppose we have a system of m equations in n variables. BIf a REF of the augmented matrix of the system has a leading 1 in the last column, then the system is said to be inconsistent (meaning, it has no solution). BSuppose the system is consistent, meaning it has a solution. If the rank of the augmented matrix is r, the set of solutions involves exactly n − r parameters.


Solving Linear Systems

The Inverse of a Matrix

Solving Two Linear Systems (with same coefficient matrix) at Once 1.

x 2x x

+ +

2y 5y

2.

x 2x x

+ 2y + 5y

+ + +

3z 3z 8z

+ 3z + 3z + 8z

= = =

4 5 9

= 1 = 6 = −6


Solving Linear Systems

The Inverse of a Matrix

Solving Two Linear Systems (with same coefficient matrix) at Once 1.

x 2x x

+ +

2y 5y

2.

x 2x x

+ 2y + 5y

+ + +

3z 3z 8z

+ 3z + 3z + 8z

= = =

4 5 9

= 1 = 6 = −6

via Gauss-Jordan reduction:   1 2 3 4 1  2 5 3 5 6  1 0 8 9 −6


Solving Linear Systems

The Inverse of a Matrix

Solving Two Linear Systems (with same coefficient matrix) at Once 1.

x 2x x

+ +

2y 5y

2.

x 2x x

+ 2y + 5y

+ + +

3z 3z 8z

+ 3z + 3z + 8z

= = =

4 5 9

= 1 = 6 = −6

via Gauss-Jordan reduction:    1 2 3 4 1 1 0 0 1 RREF  2 5 3 5 6  −−−−→  0 1 0 0 1 0 8 9 −6 0 0 1 1

 2 1  −1


Solving Linear Systems

The Inverse of a Matrix

Linear Systems and Matrices

Solving Linear Systems

The Inverse of a Matrix


Solving Linear Systems

The Inverse of a Matrix

Nonsingular/Singular Matrix

Definition An n × n matrix A is called nonsingular (or invertible) if there exists an n × n matrix A−1 such that AA−1 = A−1 A = In . The matrix A−1 is called an inverse of A. If there exists no such matrix A−1 , then A is called singular (or noninvertible).


Solving Linear Systems

The Inverse of a Matrix

Nonsingular/Singular Matrix

Definition An n × n matrix A is called nonsingular (or invertible) if there exists an n × n matrix A−1 such that AA−1 = A−1 A = In . The matrix A−1 is called an inverse of A. If there exists no such matrix A−1 , then A is called singular (or noninvertible).

Example 1. Let A =

1 3

2 4

.


Solving Linear Systems

The Inverse of a Matrix

Nonsingular/Singular Matrix

Definition An n × n matrix A is called nonsingular (or invertible) if there exists an n × n matrix A−1 such that AA−1 = A−1 A = In . The matrix A−1 is called an inverse of A. If there exists no such matrix A−1 , then A is called singular (or noninvertible).

Example 1. Let A =

1 3

2 4

−2 . Then A−1 = 3 2

1 − 12

.


Solving Linear Systems

The Inverse of a Matrix

Nonsingular/Singular Matrix

Definition An n × n matrix A is called nonsingular (or invertible) if there exists an n × n matrix A−1 such that AA−1 = A−1 A = In . The matrix A−1 is called an inverse of A. If there exists no such matrix A−1 , then A is called singular (or noninvertible).

Example 1. Let A =

1 3

2. Suppose A =

2 4

−2 . Then A−1 = 3 2 1 2 . 2 4

1 − 12

.


Solving Linear Systems

The Inverse of a Matrix

Nonsingular/Singular Matrix

Definition An n × n matrix A is called nonsingular (or invertible) if there exists an n × n matrix A−1 such that AA−1 = A−1 A = In . The matrix A−1 is called an inverse of A. If there exists no such matrix A−1 , then A is called singular (or noninvertible).

Example −2 . Then A−1 = 3 2 1 2 2. Suppose A = . 2 4 A has no inverse.

1. Let A =

1 3

2 4

1 − 12

.


Solving Linear Systems

The Inverse of a Matrix

Practical Method for Finding A−1

The practical procedure for computing the inverse of matrix A is as follows: Step 1. Form the n × 2n matrix [A : In ] obtained by adjoining the identity matrix In to the given matrix A. Step 2. Transform the matrix obtained in Step 1 to reduced row echelon form by using elementary row operations. Step 3. Suppose that Step 2 has produced the matrix [C : D] in reduced row echelon form. (a) If C = In , then D = A−1 . (b) If C 6= In , then C has a row of zeros. In this case A is singular and A−1 does not exist.


Solving Linear Systems

The Inverse of a Matrix

Practical Method for Finding A−1

The practical procedure for computing the inverse of matrix A is as follows: Step 1. Form the n × 2n matrix [A : In ] obtained by adjoining the identity matrix In to the given matrix A. Step 2. Transform the matrix obtained in Step 1 to reduced row echelon form by using elementary row operations. Step 3. Suppose that Step 2 has produced the matrix [C : D] in reduced row echelon form. (a) If C = In , then D = A−1 . (b) If C 6= In , then C has a row of zeros. In this case A is singular and A−1 does not exist.

Example 

1 If possible, find the inverse of the matrix:  0 5

1 2 2

 1 3 . 1


Solving Linear Systems

The Inverse of a Matrix

Linear Systems and Inverses

Suppose A is an n Ă— n matrix. Then the following statements are equivalent: 1. A is nonsingular. 2. A is row equivalent to In . 3. Ax = 0 has only the trivial solution. 4. The linear system Ax = b has a unique solution for every n Ă— 1 matrix b.

Solve the linear system: x 5x

+

y 2y + 2y

+ z + 3z + z

= 1 = 6 = 2


Solving Linear Systems

The Inverse of a Matrix

Solving Two Linear Systems (with same coefficient matrix) at Once 1.

x 2x x

+ +

2y 5y

2.

x 2x x

+ 2y + 5y

+ + +

3z 3z 8z

+ 3z + 3z + 8z

= = =

4 5 9

= 1 = 6 = −6


Solving Linear Systems

The Inverse of a Matrix

Solving Two Linear Systems (with same coefficient matrix) at Once 1.

x 2x x

+ +

2y 5y

2.

x 2x x

+ 2y + 5y

+ + +

3z 3z 8z

+ 3z + 3z + 8z

via the  inverse matrix:  1 2 3 A= 2 5 3  1 0 8

= = =

4 5 9

= 1 = 6 = −6


Solving Linear Systems

The Inverse of a Matrix

Solving Two Linear Systems (with same coefficient matrix) at Once 1.

x 2x x

+ +

2y 5y

2.

x 2x x

+ 2y + 5y

+ + +

3z 3z 8z

+ 3z + 3z + 8z

= = =

4 5 9

= 1 = 6 = −6

via the  inverse matrix:    1 2 3 −40 16 9 A =  2 5 3  =⇒ A−1 =  13 −5 −3  1 0 8 5 −2 −1


Solving Linear Systems

The Inverse of a Matrix

Exercise: If possible, find the inverse of the matrix:   1 2 3  2 5 4 . 3 7 3 Find the solution of the linear system, if it exists. x 2x 3x

+ 2y + 5y + 7y

+ 3z + 4z + 3z

= 1 = 6 = 5


Solving Linear Systems

The Inverse of a Matrix

For Self-Study


Solving Linear Systems

The Inverse of a Matrix

Properties of the Inverse (a) If A is a nonsingular matrix, then A−1 is nonsingular and (A−1 )−1 = A. (b) If A and B are nonsingular matrices, then AB is nonsingular and (AB)−1 = B −1 A−1 .


Solving Linear Systems

The Inverse of a Matrix

Questions? See you next meeting!


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.