0% found this document useful (0 votes)
12 views16 pages

LLMnotes1 1

This document provides an overview of systems of linear equations, defining linear equations and their solution sets. It discusses the concepts of consistency and equivalence in linear systems, as well as methods for solving these systems, including Gauss's method and elementary row operations. Additionally, it introduces matrices and their role in representing linear systems.

Uploaded by

nilufarmajidove
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views16 pages

LLMnotes1 1

This document provides an overview of systems of linear equations, defining linear equations and their solution sets. It discusses the concepts of consistency and equivalence in linear systems, as well as methods for solving these systems, including Gauss's method and elementary row operations. Additionally, it introduces matrices and their role in representing linear systems.

Uploaded by

nilufarmajidove
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Lay, Lay, McDonald Linear Algebra and its Applications, 6th ed.

Section 1.1
Page 0

Systems of Linear Equations


Section 1.1,

Computational Linear Algebra


Brian Curtin
Page 0

University of South Florida


Section 1.1,
1
Linear Equations
Definition: A linear equation in the variables x1 , x2 , . . . , xn is an
equation that can be written of the form
a1 x1 + a2 x2 + · · · + an xn = b
for some coe!cients a1 , a2 , . . . an and constant b (from R or C).
Page 1

Examples: 0 = 0, 0 = 1, x1 = 2,
0x1 + 1x2 = 1, x1 + x2 = 2
Section 1.1,

Non-examples: x21 = 1, x1 + 2x1 x2 + x2 = 0, x1 /x2 = 2, cos x1 = 1

A system of linear equations is a collection of one or more linear


Page 1

equations involving the same variables.


! !
! x1 + x2 = 2 !
Example: !! !.
Section 1.1,

x1 → 2x2 = →1 !
2
Solution Sets
A solution of a system of equations is a list (s1 , s2 , . . . sn ) of numbers
that make each equation true whenever the values s1 , . . . , sn are
substituted for the variables x1 , . . . , xn .
The solution set of a system of equations is the set of all solutions of
the system.
Page 2

! !
! x1 + x2 = 2 !
Example: !! !; sol’n set {(1, 1)}.
x1 → 2x2 = →1 !
Section 1.1,

! !
! x1 + x2 + 0x3 = 2 !
Example: !! !; sol’n set {(1, 1, t)|t ↑ R }.
x1 → 2x2 + 0x3 = →1 !
Page 2

Two linear systems are said to be equivalent whenever they have the
same solution set.
Section 1.1,
3
Geometric Examples
A system of linear equations is consistent or there exists a solution if
it has at least one solution, and it is inconsistent or has no solution
whenever it has no solution. There exists a unique solution if there is
exactly one solution.
x+y = 3 x+y = 3 x+y = 3
Page 3

x → y = →1 2x + 2y = 6 x+y = 1
Section 1.1,

Page 3

Intersect Coincide Parallel


Unique sol (1,2) Infinitely many sol No solutions
Consistent Consistent Inconsistent
Section 1.1,
4

We will see that every system of linear equations either has a unique
(one) solution, infinitely many solutions, or no solutions.
Solving
x+y = 3 x+y = 3 x+y = 3
x → y = →1 2x + 2y = 6 x+y = 1
Page 4

The plotting is not a viable solution for finding solutions for larger
Section 1.1,

systems, even three variables. However, still three cases: unique,


infinitely many, or no solutions.
Page 4
Section 1.1,
5
Solving Systems with Gauss’s Method
! !
! 3x + 2y + z = 10 !
! ! ! !
! x + y + z = 6 !! ! x+y+z = 6 !
! ! !
! x + 2y → 2z = →1 ! !
! y + 2z = 8 !
!
Swap
! 1st and 2nd equation
!
! →5z = →15 !
!
! x + y + z = 6 !! Multiply
! eqn 3 by -1/5 !
! 3x + 2y + z = 10 ! ! x+y+z = 6 !
Page 5

! ! ! !
! x + 2y → 2z = →1 ! !
! y + 2z = 8 !!
Subtract
! 3↓eqn 1 from eqn! 2
! z = 3 !
! x + y + z = 6 ! back-substitute z, simplify
Section 1.1,

! ! ! !
!
! → y → 2z = → 8 !
!
! x+y
! = 3 !!
! x + 2y → 2z = →1 ! !
! y = 2 !!
Subtract
! eqn 1 from eqn! 3
! z = 3 !
Page 5

! x+y+z = 6 !
! ! back-substitute
! y, simplify
!
! →y → 2z = →8 !
! !
! x
! = 1 !!
! y → 3z = →7 ! !
! y = 2 !!
Section 1.1,

Multiply
! eqn 2 by -1 ! ! z = 3 !
6

! x+y+z = 6 !
! ! Unique solution now evident.
!
! y + 2z = 8 !! Written neatly, variables are just place
! y → 3z = →7 ! holders.
Subtract eqn 2 from eqn 3
Matrices
m ↓ n matrix: rectangular array of numbers; m rows & n columns.
The size of matrix A is the # rows of A ↓ # of columns of A.

Given
! a system of linear equations !
! a11 x1 + a12 x2 + · · · + a1n xn = b1 !
Page 6

! !
! a21 x2 + a22 x2 + · · · + a2n xn = b2 !
! !
! .. !,
!
! . !
!
Section 1.1,

! am1 x1 + am2 x2 + · · · + amn xn = bm !


coe!cient matrix | augmented matrix is
m ↓n matrix | m ↓(n + 1) matrix
Page 6

   
a11 a12 ··· a1n a11 a12 ··· a1n b1

 a21 a22 ··· a2n 


 a21 a22 ··· a2n b2 

 ..   .. .
Section 1.1,

 .   . 
7

am1 am2 ··· amn am1 am2 ··· amn bm


Example
→x1 + x2 + 2x3 = 1
5x1 + 4x2 + 2x3 = 4
2x1 + 3x2 + x3 = →2

Coe!cient
 Matrix
 Augmented Matrix
Page 7

→1 1 2 →1 1 2 1
 5 4 2   5 4 2 4 
2 3 1 2 3 1 →2
Section 1.1,

3↓3 3↓4
Page 7

Columns ↔ variables
rows ↔ equations
Section 1.1,

System is encoded in a matrix, want to describe solution process.


8
Elementary Row Operations
The elementary row operations on a matrix are
Replacement: Replace row by the sum of itself and multiple of other
 row.   
1 2 →1 0 2 1 2 →1 0 2
 0 R3↗R3→2R1
1 1 →2 →3  ↗
 0 1 1 →2 →3 
Page 8

2 4 1 →3 →2 0 0 3 →3 →6
Interchange:
 Interchange two
 rows. 
0 1 1 →2 →3 1 2 →1 0 2
Section 1.1,

 1 R1↔R2
2 →1 0 2  ↗
 0 1 1 →2 →3 
2 4 1 →3 →2 2 4 1 →3 →2
Scaling: Multiply all entries in a rowby a nonzero constant.
Page 8


1 2 →1 0 2 1 2 →1 0 2
 0 R3↗ 13 R3
1 1 →2 →3  ↗
 0 1 1 →2 →3 
0 0 3 →3 →6 0 0 1 →1 →2
Section 1.1,
9
Solving Systems of Linear Equations
   
3 2 1 10 1 1 1 6
 1 1 1 6   0 1 2 8 
1 2 →2 →1 0 0 →5 →15
Swap
 1st and 2nd rows
 Multiply eqn 3 by-1/5

1 1 1 6 1 1 1 6
 3 2 1 10   0 1 2 8 
Page 9

1 2 →2 →1 0 0 1 3
Subtract
 3↓row 1 fromrow 2 add
 →1↓row 3 torow 1
1 1 1 6 1 1 0 3
Section 1.1,

 0 →1 →2 →8   0 1 2 8 
1 2 →2 →1 0 0 1 3
Subtract
 row 1 from row
3 add
 →2↓row 3 torow 2
1 1 1 6 1 1 0 3
Page 9

 0 →1 →2 →8   0 1 0 2 
0 1 →3 →7 0 0 1 3
Multiply row 2 by -1 add
 →1↓row 2 torow 1
Section 1.1,


1 1 1 6 1 0 0 1
10

 0 1 2 8   0 1 0 2 
0 1 →3 →7 0 0 1 3
Subtract eqn 2 from eqn 3 Solved! x1 = 1, x2 = 2, x3 = 3
Row Operations are “Safe”

Two matrices are row equivalent if there is a sequence elementary


Page 10

row operations that transforms one into the other.

If the augmented matrix of a linear system is changed to another by


Section 1.1,

one of the elementary row operations then the two systems have the
same set of solutions.
Page 10

Row equivalent augmented matrices correspond systems with the


same solution set.
Section 1.1,
11
A Second Example
! !
! x + 2y → z = 2 !
! !
! 2x + y + 3z = 3 !
! !
! x → 4y + 9z = →2 !
ρ! 2 ↗ ρ2 → 2ρ1 ,ρ3 ↗ ρ3 → !ρ1 System is inconsistent.
! x + 2y → z = 2 !
! ! No substitution will make it true.
! →3y + 5z = →1 !
Page 11

! !
! → 6y + 10z = 4 !
Note: non-interfering operations
ρ! 3 ↗ ρ3 → 2ρ2
! x + 2y → z = 2 !
! done in one step. Can do so on HW
Section 1.1,

! !
! →3y + 5z = →1 !
! !
! 0 = 2 !
Equation 0 = 2 has no solution
Page 11
Section 1.1,
12
A Third Example
! !
! x + 2y → z = 1 !
! !
! 2x + 4y + z = 5 !
! !
! x + 2y + 2z = 4 ! ! !
! x + 2y = 2 !
ρ! 2 ↗ ρ2 → 2ρ1 ,ρ3 ↗ ρ!3 → ρ1 ! !
! x + 2y → z = 1 !
!
! z = 1 !
!
!
! 0 + 0 + 3z = 3 !
! ! 0 = 0 !
Page 12

! !
! 0 + 0 + 3z = 3 !
Many solutions–can’t pin down the
!ρ3 ↗ ρ3 → ρ2 ! values since not all variables are
! x + 2y → z = 1 !
Section 1.1,

! ! leading.
! 0 + 0 + 3z = 3 !
! !
! 0+0+0 = 0 !
Will learn to read that
!ρ3 ↗ ρ3 /3 ! any tuple (→2s + 2, s, 1)
Page 12

! x + 2y → z = 1 !
! ! is a solution!
! 0+0+z = 1 !
! !
! 0 = 0 !
Section 1.1,

ρ1 ↗ ρ1 + ρ2
13
MATLAB

MATLAB’s symbolic toolbox can handle linear systems.


Page 13

syms x y z
S1eqn1 = x + y == 0;
S1eqn2 = x - 2*y - 3*z == -3;
S1eqn3 = x- y + 2*z == 6;
System1 = [S1eqn1, S1eqn2, S1eqn3]
Section 1.1,

, -
x+y = 0 x → 2 y → 3 z = →3 x→y+2z = 6

S1sol = solve(System1, [x,y,z])


S1sol =
x: 1
Page 13

y: -1

z: 2

(The data type is a struct)


Section 1.1,
14
MATLAB

MATLAB works with numeric matrices by default.


C1 = [1 1 0; 1 → 2 → 3; 1 → 1 2], b1 = [0; →3; 6]
Page 14

C1
 = 
1 1 0
 1 →2 →3 
1 →1 2
b1
= 
0
Section 1.1,

 3 
6

can use mldivide (\) or linsolve


linsolve(C1,
  b1)
Page 14

1
ans =  →1 
2

May not get an answer you expect if there is no solution (may get
least squares solution) or more than one solution (only get one
Section 1.1,

solution by default). May get warning.


15
Page 15
MATLAB

At this time, students should use the result of row reduction (see
next section) to find solutions.
Section 1.1,

Elementary row operations not defined commands in MATLAB, but


see my samples for basic (unvalidated) code.
Page 15
Section 1.1,
16

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy