Professional Documents
Culture Documents
Level-Up Linear Algebra 1
Level-Up Linear Algebra 1
Linear Algebra 1
Morris Alper
● Linear Equations
● Systems of Linear Equations
● Vectors
● Matrices
● Row Reduction
● Vectors spans and bases
● Gram-Schmidt
● Further Reading
Linear Equations
Linear Equations
𝑦 = 2𝑥 − 1
Linear Equations
𝑦 = 4𝑥 − 1
Linear Equations
𝑦 = 4𝑥 − 4
Linear Equations
𝑦 = 2𝑥 − 1 ⇒ −𝟐𝒙 + 𝒚 = 𝟏
𝑦 = 4𝑥 − 1 ⇒ −𝟒𝒙 + 𝒚 = −𝟏
𝑦 = 4𝑥 − 4 ⇒ −𝟒𝒙 + 𝒚 = −𝟒
Linear Equations
𝑎1 𝑥 + 𝑎2 𝑦 = 𝑏
for constants 𝑎1 , 𝑎2 , 𝑏,
Linear Equations
𝑎1 𝑥 + 𝑎2 𝑦 + 𝑎3 𝑧 = 𝑏
for constants 𝑎1 , 𝑎2 , 𝑎3 , 𝑏,
Linear Equations
𝑥 + 𝑦 − 3𝑧 = −1
Linear Equations
2𝑥 + 𝑦 + 𝑧 = 3
Linear Equations
𝑎1 𝑥1 + 𝑎2 𝑥2 + ⋯ + 𝑎𝑛 𝑥𝑛 = 𝑏
for constants 𝑎1 , 𝑎2 , … , 𝑎𝑛 , 𝑏.
3𝑥 − 2𝑦 = −2
𝑥+𝑦 =6
Systems of Linear Equations
3𝑥 − 2𝑦 = −2
𝑥+𝑦 =6
Systems of Linear Equations
3𝑥 − 2𝑦 = −2
𝑥+𝑦 =6
One solution
Systems of Linear Equations
No solutions
Systems of Linear Equations
Infinite solutions
Vectors
Vectors
or
Vectors
Notation:
*You may also see vectors written with a superscript arrow, e.g. 𝑣.
Ԧ
Vectors
● 𝒗 + 𝒘 = (𝑣1 + 𝑤1 , 𝑣2 + 𝑤2 )
● 𝒗 − 𝒘 = (𝑣1 − 𝑤1 , 𝑣2 − 𝑤2 )
● 𝑐𝒗 = (𝑐𝑣1 , 𝑐𝑣2 )
Vectors
Example:
● 𝒗 = 1, 2
● 𝒘 = 1, 0.5
● 𝒗 + 𝒘 = 1 + 1, 2 + 0.5 = (2, 2.5)
Vectors
Example:
● 𝒗 = 1, 2
● 𝒘 = 1, 0.5
● 𝒗 − 𝒘 = 1 − 1, 2 − 0.5 = (0, 1.5)
Vectors
Example:
● 𝒘 = 1, 0.5
● 𝟐𝒘 = 2 ⋅ 1, 2 ⋅ 0.5 = (2, 1)
Vectors
We can turn any vector into a unit vector by dividing it by its norm. We
usually use a superscript hat to indicate a unit vector, as shown below:
1
ෝ=
𝒗 𝒗
𝒗
1 1
Then 𝒗
ෝ = 𝒗 = 𝒗 = 1.
𝒗 𝒗
Vectors
Example:
𝒗 = 3, 4
1 3 4
ෝ=
𝒗 3, 4 = ( , ) is a unit vector
5 5 5
pointing in the same direction as 𝒗.
Vectors
The dot product is an operation which takes two vectors as inputs and
returns a scalar value as output.
Definition: For 𝒗, 𝒘 ∈ ℝ𝑛 ,
𝑛
𝒗 ⋅ 𝒘 = 𝑣1 𝑤1 + 𝑣2 𝑤2 + ⋯ + 𝑣𝑛 𝑤𝑛 = 𝑣𝑖 𝑤𝑖
𝑖=1
Example:
1, 3, 4 ⋅ −1, 2, 0 = 1 ⋅ −1 + 3 ⋅ 2 + 4 ⋅ 0 = 5
Vectors
● 𝒗⋅𝒘=𝒘⋅𝒗 (commutativity)
● 𝑐𝒗 ⋅ 𝒘 = 𝒗 ⋅ 𝑐𝒘 = 𝑐(𝒗 ⋅ 𝒘) (linearity)
● 𝒗⋅𝒗= 𝒗 2
Example:
𝒗 = 1, 1 , 𝒘 = (0, 2)
𝒗⋅𝒘=1⋅0+1⋅2=2 𝜋
𝜃= (45° )
𝒗 = 2 𝒘 =2 4
𝜋
𝜃= (45° )
4
2
𝒗 𝒘 cos 𝜃 = 2 ⋅ 2 ⋅ =2
2
Vectors
Example:
𝒗 = 1, 1 , 𝒘 = (1, −1)
𝒗 ⋅ 𝒘 = 1 ⋅ 1 + 1 ⋅ −1 = 0
𝑎1,1 ⋯ 𝑎1,𝑛
𝐴= ⋮ ⋱ ⋮
𝑎𝑚,1 ⋯ 𝑎𝑚,𝑛
1 2 −2 3
The coefficient matrix is the 4 × 4 matrix 𝐴 = −1 2 −1 7 .
3 3 0 1
−1 −1 5 5
Matrices
Example 1:
1 2 5 𝑥
1
𝑥 + 2𝑦 + 5𝑧 = 1 𝐴 = 2 −1 0 𝒗= 𝑦 𝒃=
2 𝑧 3
1
2𝑥 − 𝑦 = 3
2
Matrices
Example 2: 1 2 −2 3
𝑥1 + 2𝑥2 − 2𝑥3 + 3𝑥4 = 4 𝐴 = −1 2 −1 7
3 3 0 1
−𝑥1 + 2𝑥2 − 𝑥3 + 7𝑥4 = 3
−1 −1 5 5
3𝑥1 + 3𝑥2 + 𝑥4 = 2
−𝑥1 − 𝑥2 + 5𝑥3 + 5𝑥4 = 1 𝑥1 4
𝑥2
𝒗= 𝑥 𝒃= 3
3 2
𝑥4 1
Matrices
4
𝑇 = 3
4 3 −1
−1
𝑇
1 2 −2 3 1 −1 3 −1
−1 2 −1 7 = 2 2 3 −1
3 3 0 1 −2 −1 0 5
−1 −1 5 5 3 7 1 5
Row Reduction
Row Reduction
3𝑥 + 11𝑦 + 5𝑧 = 35
2𝑥 + 2𝑦 − 2𝑧 = 2
𝑥 + 3𝑦 + 𝑧 = 9
Consider how we can “change” the equations while keeping the solutions the
same.
3𝑥 + 11𝑦 + 5𝑧 = 35 2𝑥 + 2𝑦 − 2𝑧 = 2
2𝑥 + 2𝑦 − 2𝑧 = 2 ⇒ 3𝑥 + 11𝑦 + 5𝑧 = 35
𝑥 + 3𝑦 + 𝑧 = 9 𝑥 + 3𝑦 + 𝑧 = 9
Row Reduction
Consider how we can “change” the equations while keeping the solutions the
same.
3𝑥 + 11𝑦 + 5𝑧 = 35 3𝑥 + 11𝑦 + 5𝑧 = 35
𝟐𝒙 + 𝟐𝒚 − 𝟐𝒛 = 𝟐 ⇒ 𝒙+𝒚−𝒛=𝟏
𝑥 + 3𝑦 + 𝑧 = 9 𝑥 + 3𝑦 + 𝑧 = 9
Row Reduction
Consider how we can “change” the equations while keeping the solutions the
same.
𝟑𝒙 + 𝟏𝟏𝒚 + 𝟓𝒛 = 𝟑𝟓 𝟐𝒚 + 𝟐𝒛 = 𝟖 (−3𝑒𝑞3 )
2𝑥 + 2𝑦 − 2𝑧 = 2 ⇒ 2𝑥 + 2𝑦 − 2𝑧 = 2
𝒙 + 𝟑𝒚 + 𝒛 = 𝟗 𝑥 + 3𝑦 + 𝑧 = 9
Row Reduction
3𝑥 + 11𝑦 + 5𝑧 = 35
3 11 5 | 35
2𝑥 + 2𝑦 − 2𝑧 = 2 ⇒ 2 2 −2 | 2
1 3 1 | 9
𝑥 + 3𝑦 + 𝑧 = 9
The three operations we listed are called elementary row operations on the
augmented matrix.
Row Reduction
1. Exchange rows
2. Multiply/divide row by a (nonzero) constant
3. Add/subtract multiple of one row from another
Row Reduction
1. Exchange rows
3 11 5 | 35 2 2 −2 | 2
2 2 −2 | 2 ⇒ 3 11 5 | 35
1 3 1 | 9 1 3 1 | 9
Row Reduction
3 11 5 | 35 3 11 5 | 35
𝟐 𝟐 −𝟐 | 𝟐 ⇒ 𝟏 𝟏 −𝟏 | 𝟏
1 3 1 | 9 1 3 1 | 9
Row Reduction
𝟑 𝟏𝟏 𝟓 | 𝟑𝟓 𝟎 𝟐 𝟐 |𝟖
2 2 −2 | 2 ⇒ 2 2 −2 |2
𝟏 𝟑 𝟏 | 𝟗 1 3 1 |9
We can use elementary row operations to simplify the augmented matrix, converting it
into row-echelon form: the first nonzero coefficient in each row is 1, with 0’s
underneath it, and any rows of all zeros at the bottom of the matrix.
3 11 5 | 35 1 3 1 |9 1 3 1 | 9 1 3 1 | 9
2 2 −2 | 2 ⇒ 2 2 −2 |2 ⇒ 0 −4 −4 | − 16 ⇒ 0 1 1 | 4
1 3 1 | 9 3 11 5 | 35 3 11 5 | 35 3 11 5 | 35
1 3 1 | 9 1 3 1 | 9 1 3 1 | 9
⇒ 0 1 1 | 4 ⇒ 0 1 1 | 4 ⇒ 0 1 1 | 4
0 2 2 |8 0 1 1 |4 0 0 0 | 0
We can simplify further with elementary row operations to put the augmented matrix in
reduced row-echelon form, where each leading coefficient is 1 and all other elements
in that column are 0
1 3 1 | 9 1 0 −2 | − 3
0 1 1 | 4 ⇒ 0 1 1 | 4
0 0 0 | 0 0 0 0 | 0
Example:
2𝑥 + 𝑦 − 𝑧 = 8
−3𝑥 − 𝑦 + 2𝑧 = −11
−2𝑥 + 𝑦 + 2𝑧 = −3
Example:
Example:
Example:
The span of a set of vectors is defined as the set of all linear combinations
of the vectors.
Examples:
3 𝑥
𝑠𝑝𝑎𝑛 ={ ∶ 𝑥 ∈ ℝ}
0 0
5 −1 1 𝑥
𝑠𝑝𝑎𝑛 0 , 0 , 2 = { 𝑦 ∶ 𝑥, 𝑦 ∈ ℝ}
0 0 0 0
Vector Spans and Bases
Therefore we can use row reduction with the vectors as rows to simplify the
span:
Example:
3 2 1 3 11 5 1 0 −2
𝑠𝑝𝑎𝑛 11 , 2 , 3 2 2 −2 ⇒ 0 1 1
5 −2 1 1 3 1 0 0 0
1 0
= 𝑠𝑝𝑎𝑛 0 , 1
−2 1
Vector Spans and Bases
Examples:
1 0 2 −3
{ , } and { , } are both bases for ℝ2 (2-dimensional).
0 1 1 0
1 0 3 2 1
{ 0 , 1 } is a basis for 𝑠𝑝𝑎𝑛 11 , 2 , 3 (2-dimensional).
−2 1 5 −2 1
Vector Spans and Bases
Therefore we can use row reduction with the vectors as rows to find a basis
for the span:
Example 1:
5 −1 1 5 0 0 1 0 0
𝑠𝑝𝑎𝑛 0 , 0 , 2 −1 0 0 ⇒ 0 1 0
0 0 0 1 2 0 0 0 0
1 0
= 𝑠𝑝𝑎𝑛 0 , 1
0 0
Vector Spans and Bases
Example:
1 0 2 −3
{ , } and { , } are both bases for ℝ2
0 1 1 0
11 1 0
The vector 𝒗 = is equal to 11 + 1 , so it has coordinates (11, 1) in the
1 0 1
1 0
basis { , }.
0 1
2 −3 2 −3
Also, 𝒗 = 1 −3 , so it has coordinates (1, −3) in the basis { , }.
1 0 1 0
Vector Spans and Bases
An orthonormal basis is a basis of unit vectors which are all orthogonal to each other.
Example 1:
1 0
𝒗= 𝒘=
0 1
{𝒗, 𝒘} is an orthonormal basis for ℝ2 because they are unit vectors and orthogonal to
each other:
𝒗 = 𝒘 =1
𝒗⋅𝒘=0
Vector Spans and Bases
An orthonormal basis is a basis of unit vectors which are all orthogonal to each other.
Example 2:
2/2 2/2
𝒗= 𝒘=
2/2 − 2/2
{𝒗, 𝒘} is an orthonormal basis for ℝ2 because they are unit vectors and orthogonal to
each other:
𝒗 = 𝒘 =1
𝒗⋅𝒘=0
Vector Spans and Bases
An orthonormal basis is a basis of unit vectors which are all orthogonal to each other.
Example 3:
1 2/2
𝒗= 𝒘=
0 − 2/2
2
{𝒗, 𝒘} is not orthonormal basis for ℝ2 because 𝒗 ⋅ 𝒘 = >0
2
Vector Spans and Bases
𝒗 𝟏 ,𝒗
If {ෝ ෝ 𝟐 ,…,𝒗
ෝ 𝒌 } is an orthonormal basis for a vector space, then the coordinates of
any vector 𝒘 from the vector space in this basis are given by:
ෝ
𝒘= 𝒘⋅𝒗 𝟏 ෝ
𝒗 𝟏 ෝ
+ 𝒘⋅𝒗 𝟐 ෝ
𝒗 𝟐 ෝ
+ ⋯+ 𝒘 ⋅ 𝒗 𝒌 ෝ
𝒗 𝒌
𝟏 𝟐 𝒌
i.e. 𝒘 has coordinates (𝒘 ⋅ 𝒗
ෝ ෝ
,𝒘⋅ 𝒗 ෝ
,…,𝒘 ⋅ 𝒗 ) in the basis.
Vector Spans and Bases
Example:
2/2 2/2
𝒗= 𝒘=
2/2 − 2/2
4
In the orthonormal basis {𝒗, 𝒘} of ℝ2 , the vector 𝒖 = has coordinates:
−2
𝒖 ⋅ 𝒗, 𝒖 ⋅ 𝒘 = ( 2, 3 2)
Gram-Schmidt
Gram-Schmidt
1
For all 𝑖, let 𝒆𝒊 = 𝒖𝒊 .
𝒖𝒊
Gram-Schmidt
Example:
3 −1
𝒗𝟏 = 𝒗𝟐 =
4 1
3
𝒖𝟏 = 𝒗𝟏 =
4
−1 3
𝒖𝟏 ⋅ 𝒗𝟐 ⋅
𝑝𝑟𝑜𝑗𝒖𝟏 𝒗𝟐 = 𝒖 = 1 4 3 = 1 3 = 3/25
𝒖𝟏 𝟐 𝟏 52 4 25 4 4/25
−1 3/25 −28/25
𝒖𝟐 = 𝒗𝟐 − 𝑝𝑟𝑜𝑗𝒖𝟏 (𝒗𝟐 ) = − =
1 4/25 21/25
Gram-Schmidt
Example:
3 −1
𝒗𝟏 = 𝒗𝟐 =
4 1
3 𝟏 1 3 3/5
𝒖𝟏 = 𝒆𝟏 = 𝒖𝟏 = =
4 𝒖𝟏 5 4 4/5
3/5 −4/5
So Gram-Schmidt yields the orthonormal basis {𝒆𝟏 , 𝒆𝟐 } = { , }.
4/5 3/5
Further Reading
Further Reading
● https://tutorial.math.lamar.edu/classes/calcii/dotproduct.
aspx
● https://textbooks.math.gatech.edu/ila/row-reduction.html
● http://ltcconline.net/greenl/courses/203/vectors/linindspa
n.htm
● http://ltcconline.net/greenl/courses/203/vectors/orthonor
malbases.htm