LLMnotes1 1
LLMnotes1 1
Section 1.1
Page 0
Examples: 0 = 0, 0 = 1, x1 = 2,
0x1 + 1x2 = 1, x1 + x2 = 2
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
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,
! ! ! !
! 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,
a11 a12 ··· a1n a11 a12 ··· a1n b1
a21 a22 ··· a2n
a21 a22 ··· a2n b2
.. .. .
Section 1.1,
. .
7
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,
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 rowby 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 fromrow 2 add
→1↓row 3 torow 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 torow 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 torow 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”
one of the elementary row operations then the two systems have the
same set of solutions.
Page 10
! !
! → 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
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
y: -1
z: 2
C1
=
1 1 0
1 →2 →3
1 →1 2
b1
=
0
Section 1.1,
3
6
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,
At this time, students should use the result of row reduction (see
next section) to find solutions.
Section 1.1,