• No results found

x y The matrix form, the vector form, and the augmented matrix form, respectively, for the system of equations are

N/A
N/A
Protected

Academic year: 2021

Share "x y The matrix form, the vector form, and the augmented matrix form, respectively, for the system of equations are"

Copied!
9
0
0

Loading.... (view fulltext now)

Full text

(1)

11

Lab 2

Solving Systems of Linear Equations in Matrix Form with rref

Learning Goals

Determine the solution of a system of equations from the augmented matrix Determine the reduced row echelon form of the augmented matrix, rref

Keywords: system of linear equations, matrix form or system of linear equations, augmented matrix, rref

Example 1: Solve the system of linear equations in the two variablesxand y

4

2 4 14

x y

x y

The matrix form of this equation, AX B , the matrix of coefficients times the vector of

variables set equal to the right hand side vector of constants, is written as

1 1 4

2 4 14

x y

The matrix form, the vector form, and the augmented matrix form, respectively, for the system of equations are 1 1 4 1 1 4 1 1 4 2 4 14 2 4 14 2 4 14 x x y y

Matrix form Vector form of equations Augmented form

The augmented matrix will be entered into the MATLAB and the rref command will be used to help find the solution. The rref command computes the reduced row echelon form of a matrix. We will store our augmented matrix into the 2 3 (two rows and three columns) matrix A . The MATLAB commands to complete the problem with the associated MATLAB results follow. A=[1 -1 4;2 4 14] A = 1 -1 4 2 4 14 rref(A) ans = 1 0 5 0 1 1

The reduced row echelon form of the augmented matrix means that the original problem has been transformed to a system of equations where the solution is easy to determine. The rref

(2)

12

version of the augmented matrix has 2 pivots and no free variables so the system of equations will have a unique solution. The equation form of the rref result is:

5 1

x y

Solution type: Unique solution; solution: x 5, y 1. The solution of the system of equations is the ordered pair 5,1 . The equations will both be true at the same time if x 5 and y 1. Graphically, this means that the two equations represent straight lines that intersect at exactly one point. The solution, in vector form, is

5 1

x y

Example 2: Solve the system of linear equations in the two variablesxand y

3

2 3 12

y x

x y

To put the system of equations into matrix form and then the augmented matrix form we need to rewrite the system so that the x’s and the y ’s are lined up on one side of the equation and the

constant part is on the other side.

3 0

2 3 12

x y

x y

The matrix, vector, and augmented matrix forms, respectively, of the equations are

3 1 0 3 1 0 3 1 0

2 3 12 2 3 12 2 3 12

x

x y

y

Matrix form Vector form of equations Augmented form

Enter the augmented matrix into the MATLAB and use the rref command to help find the solution of the system of equations. MATLAB displays

1 0 1.0909 0 1 3.2727

(3)

13 Solution type: Unique solution; solution: x 1.0909 , y 3.2727 .

The exact solutions are 12 11

x and 36

11

y . To display the answer in fraction form (as rational numbers) enter format rat, then redo the rref work. The solution is the ordered pair,

12 36 ,

11 11 . Graphically, the equations represent two straight lines that intersect at exactly one point, a unique solution.

Example 3: Solve the system of linear equations in the two variablesxand y

2 4

6 3 6

x y

x y

The matrix and augmented matrix forms of the equations are

2 1 4 2 1 4

6 3 6 6 3 6

x y

Matrix form Augmented form

Enter the augmented matrix into the MATLAB and use the rref command to help find the solution of the system of equations. MATLAB displays

1 -.5 0 0 0 1

The rref version of the augmented matrix has 1 pivot and 1 free variable so the system of equations will not have a unique solution. From the reduced row echelon form of the augmented matrix, our original problem has been transformed to one of the form

0.5 0

0 1

x y

Solution type: Contradiction; solution: No Solution or inconsistent.

There are no pairs of ,x y that satisfy both equations at the same time. Graphically, the

equations represent parallel lines with no points in common.

Example 4: Solve the system of linear equations in the two variablesxand y

4 2

2 8 4

x y

y x

(4)

14

4 1 2 4 1 2

8 2 4 8 2 4

x y

Enter the augmented matrix into the MATLAB and use the rref command to help find the solution of the system of equations. MATLAB displays

1 -0.25 0.5 0 0 0

The transformed equations are:

0.25 0.5

0 0

x y

The rref result indicates 1 pivot and 1 free variable so no unique solution. Solution type:

Consistent and dependent or Identity; solution: x 0.25y 0.5,y ( y is any real number).

Alternately, one may write: x 0.25t 0.5,t or x y, |x 0.25 ,t t . Some sample

solutions: x 1,y 2, x 2, y 10.

Vector form of solution. The vector form of the solutions is determined from the

transformed equations that are written using the rref version of the augmented matrix. The regular variables are solved in terms of the free variables from the transformed equations and the free variables set equal to themselves. The vector form of the solution is:

0.25 0.5

x y

y y

Parametric form of solution. The general solution of AX B is X vh p, where vh

is the solution of the homogeneous problem, AX 0 , and p is the particular part of the solution

due to a nonzero right hand side vector, B . The parametric form of the solution to the linear system of equations AX B with the parameter t is:

0.25 0.5 0.25 0.5 , ; : , 1 0 h 1 0 x t t then v t p y

Example 5: Three equations with three unknowns. Solve the system of linear equations in

the three variablesx, y , and z .

4 4 2 4 14 4 3 8 x y z x y z x z

(5)

15 1 1 4 4 1 1 4 4 1 1 4 4 2 4 1 14 2 4 1 14 2 4 1 14 4 0 3 8 4 0 3 8 4 0 3 8 x y x y z z

Matrix form Vector form of equations Augmented form

The augmented matrix is entered into MATLAB and the rref command applied to determine the solution of the system of equations. Store the augmented matrix into the 3 4 (three rows and four columns) matrix A using the EDIT option of the MATLAB MATRIX menus. MATLAB commands and results are

A=[1 -1 4 4;2 4 -1 14;4 0 3 8] A = 1 -1 4 4 2 4 -1 14 4 0 3 8 rref(A) ans = 1.0000 0 0 0.7143 0 1.0000 0 3.5714 0 0 1.0000 1.7143

The rref version of the augmented matrix has 3 pivots with no free variables so the system of equations will have a unique solution. Solution type: Unique solution.

Solution: x 0.714285 ,y 3.57142 , z 1.71428 . Vector form of the solution: .714285... 3.57142... 1.71428... x y z

The solution of the system of equations is the ordered triple

0.714285 , 3.57142 ,1.71428 , that is, the equations will all be true at the same time if 0.714285 , 3.57142 ,

x y and z 1.71428 . Geometrically the three equations represent three planes that intersect at exactly one point. The general solution of AX B is X vh p, so the parametric form of the solution to the linear system above is:

0 0.714285 0.714285 0 0.714285 0 3.57142 3.57142 ; : 0 , 3.57142 0 1.71428 1.71428 0 1.71428 h x y t with v p z

Note: Here the homogeneous part of the solution is the zero vector since AX B has a unique

solution for any right hand side. This also means that AX 0 has only the zero solution X 0 .

(6)

16

Exercises

Solve the following systems of equations using augmented matrices and the rref command in MATLAB. Determine the augmented matrix, the equivalent form as transformed by rref, write down the new transformed system of equations from the rref result, and the solution, if any. Also write out the vector form of the equations and the solution in parametric form. Identify the particular, p, and homogeneous, vh, parts of the vector form. Indicate the number of pivots and circle the pivot columns of the augmented matrix.

1. Determine: augmented matrix, rref equivalent form, and the solution, if any. 3

2 3

x y x y

Augmented matrix: rref result: new equation from rref result:

Number of pivots ____ Free variables ______ Solution type: ________________ Solution: x ___________ y ____________

Vector form of solution: p = , vh =

Parametric form of solution:

2. Determine: augmented matrix, rref equivalent form, and the solution, if any.

10 15 20

2 3 4

x y

x y

Augmented matrix: rref result: new equation from rref result:

Number of pivots ____ Free variables ______ Solution type: ________________ Solution: x ___________ y ____________

Vector form of solution: p = , vh =

(7)

17 3. Determine: augmented matrix, rref equivalent form, and the solution, if any.

4 6 3

2 3 3

x y x y

Augmented matrix: rref result: new equation from rref result:

Number of pivots ____ Free variables ______ Solution type: ________________ Solution: x ___________ y ____________

Vector form of solution: p = , vh =

Parametric form of solution:

4. Determine: augmented matrix, rref equivalent form, and the solution, if any. 4 2 4 6 6 3 2 2 x y z x y z x y z

Augmented matrix: rref result: new equation from rref result:

Number of pivots ____ Free variables ______ Solution type: ________________ Solution: x ___________ y ____________ z ___________________

Vector form of solution: p = , vh =

(8)

18

5. Determine: augmented matrix, rref equivalent form, and the solution, if any. 4 2 4 5 2 4 5 x y z x z x z

Augmented matrix: rref result: new equation from rref result:

Number of pivots ____ Free variables ______ Solution type: ________________ Solution: x ___________ y ____________ z ___________________

Vector form of solution: p = , vh =

Parametric form of solution:

6. Determine: augmented matrix, rref equivalent form, and the solution, if any.

1 2 3 1 2 1 2 3 1 2 3 2 5 2 1 8 3 5 12 41 x x x x x x x x x x x

Augmented matrix: rref result: new equation from rref result:

Number of pivots ____ Free variables ______ Solution type: ________________ Vector form of solution:

(9)

19 7. Determine: augmented matrix, rref equivalent form, and the solution, if any.

1 2 3 4 1 2 3 4 1 2 3 4 3 2 2 2 1 3 2 4 6 x x x x x x x x x x x x

Augmented matrix: rref result: new equation from rref result:

Number of pivots ____ Free variables ______ Solution type: ________________ Solution: _________________________________________

Vector form of solution: p = , vh =

Parametric form of solution:

Challenge Problem 1. Determine a value(s) of the right hand side number of equation 4 of Problem 6 so the new system of equations has a unique solution, that is, replace 41 with a number that results in a consistent system of equations. Write out the new system of equations, the rref result and the solution. Provide a printout of your MATLAB work.

Challenge Problem 2. Determine new equations, to add a 4th equation to the system of equations of problem 7, so that:

a. the 4th equation leads to a new system of equations with a unique solution. b. the 4th equation leads to a new system of equations that is inconsistent.

In each case write out the new system of equations and the equations from the rref result that illustrate the stated conditions. Print your MATLAB work to corroborate that your equations satisfy the stated conditions.

References

Related documents

PTI: Pure Technical Inefficiency, TSE: Time Shift Effect, EE: Environmental Effects. Figure 5.2: Decomposition of technical

Such agreements are often defined by service level agreements (SLAs), which indicate the quality of service that the provider will guarantee, or peering contracts, which define

Coup d’état, when considered as Terrorism A person who commits an act punishable as coup d’état under Article 134-A of the Revised Penal Code, including acts

In this section we introduce primitive recursive set theory with infinity (PRSω), which will be the default base theory for the rest of this thesis (occasionally exten- ded by

Christ before Pilate at the trial of Jesus revealed one of his last claims. Jesus and his word are ultimate truth. The Pontius Pilate and Jesus exchange set the two positions

PREREQUISITE(S): ALL CORE BUSINESS & SPECIALIZATION COURSES This course provides students with the opportunity to apply the theories, knowledge, and skills developed in

1) The versatility and low cost of wet welding makes this method highly desirable. 2) Other benefits include the speed. With which the operation is carried out. 3) It is less

 Drains designed for carrying storm water runoff run full during off season primarily carrying sewage and solid waste..  Thereby drains cannot carry surface runoff