MATH 136

Linear Algebra 1

Instructor: Carrie Knoll Section: Monday/Wednesday Monday & Wednesday 1:30 p.m.-2:20 p.m. Email: caknoll@uwaterloo.ca Office: MC 6236 Office Hours: Mon: 10am-11am, Wed:3pm-4pm, Fri: 9:30am-10:30am Textbook: Course Notes Midterm: Monday, February 10, 7:00-8:50 p.m.
Week Dates Sections Topics
1 Jan 6-10 1.1, 1.2 Vectors in Rn, Spanning, Linear Independence
2 Jan 13-17 1.2, 1.3, 1.4 Bases, Subspaces, Dot Product
3 Jan 20-24 1.4, 1.5, 2.1 Cross Product, Projections, Systems of Linear Equations
4 Jan 27-31 2.2, 3.1 Systems of Linear Equations, Matrices
5 Feb 3-7 3.1, 3.2 Matrix Operations, Matrix Mappings
6 Feb 10-14 3.2, 3.3, 3.4 Linear Mappings, Special Subspaces, Operations on Mappings
7 Feb 17-21 READING WEEK
8 Feb 24-Feb 28 4.1, 4.2 Vector Spaces, Bases9Mar 2-64.2, 4.3Dimension, Coordinates
10 Mar 9-13 5.1, 5.2 Matrix Inverse, Elementary Matrices
11 Mar 16-20 5.3, 5.4 Determinants, Inverse by Cofactors, Cramer's Rule
12 Mar 23-27 5.5, 6.1, 6.2 Area and Volume, Similar Matrices, Eigenvalues
13 Mar 30-Apr 3 6.2, 6.3, 6.4 Diagonalization, Powers of Matrices

6/1/20

Functions

In first year calculus, we study real numbers, R\mathbb{R}, and functions on the real numers, f:R→Rf:\mathbb{R} \rightarrow \mathbb{R}

we ask questions about domain, range, injecti\vec{v_i}ty, surjecti\vec{v_i}ty, invertibility, extrema, continuity, differentiability, integrability, etc.

There are many important functions that do not have domain and codomain R\mathbb{R}. Let's start by introducing just one new set of objects to consider as inputs and outputs for our functions:

Functions f:Rn→Rmf: \mathbb{R}^{n} \rightarrow \mathbb{R}^m

R2={(x,y):x,y∈R}\mathbb{R}^{2} = \{(x,y):x,y \in \mathbb{R}\}

Real Vectors: Rn=x⃗=(x1,x2,⋯ ,xn):xi∈R\mathbb{R}^{n} = \vec{x} = (x_1, x_2,\cdots, x_n): x_i \in \mathbb{R}

In multivariate calculus and vector calculus, you will talk about graphing functions like this and discuss things liek continuity and differentiability in linear algebra we focus our time as follows:

Chapter 1

Definition: the n-dimensional Euclidean space, or Rn\mathbb{R}^n, consists of all objects of the form

x⃗=[x1x2⋮xn]\vec{x} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix}

where x1,x2,⋯ ,xnx_1, x_2, \cdots, x_n are in R\mathbb{R}

Note:

In linear algebra all vectors should be denoted with column vectors. However, sometimes n-tuples are used to match notation commonly used in other areas.

Arithmetic in R\mathbb{R}

there are two basic operations performed on vectors in R\mathbb{R}

Definition - Multiplication: Given a scalar c∈Rc \in \mathbb{R} and a vector x⃗∈R\vec{x}\in \mathbb{R} we define cx⃗c\vec{x} to be

c[x1x2⋮xn]=[cx1cx2⋮cxn]c \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix} = \begin{bmatrix} cx_1 \\ cx_2 \\ \vdots \\ cx_n \end{bmatrix}

Definition - Vector Addition: Given two vectors x⃗,y⃗∈R\vec{x},\vec{y}\in \mathbb{R} we define x⃗+y⃗\vec{x} + \vec{y} to be

[x1x2⋮xn]+[y1y2⋮yn]=[x1+y1x2+y2⋮xn+yn]\begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix} + \begin{bmatrix} y_1 \\ y_2 \\ \vdots \\ y_n \end{bmatrix}= \begin{bmatrix} x_1 + y_1 \\ x_2 + y_2 \\ \vdots \\ x_n + y_n \end{bmatrix}

Theorem - (p, 4, properties of vector arithmetic)
if x⃗,y⃗\vec{x},\vec{y} are vectors from R\mathbb{R} and cc and dd are scalars from R\mathbb{R}, then:
(V1) x⃗+y⃗\vec{x} + \vec{y} is in R\mathbb{R}
(V2) (x⃗+y⃗)+w⃗=x⃗+(y⃗+w⃗)(\vec{x} +\vec{y}) + \vec{w} = \vec{x} + (\vec{y} + \vec{w})
(V3) x⃗+y⃗=y⃗+x⃗\vec{x} + \vec{y} = \vec{y} + \vec{x}
(V4) There exists a vector 0⃗∈R\vec{0} \in \mathbb{R} such that x⃗+0⃗=x⃗\vec{x} + \vec{0} = \vec{x} for all x⃗∈R\vec{x} \in \mathbb{R}
(V5) For every x⃗∈R\vec{x} \in \mathbb{R} there exists (−x⃗)∈R(-\vec{x}) \in \mathbb{R} such that x⃗+(−y⃗)=0⃗\vec{x} + (-\vec{y}) = \vec{0}
(V6) cx⃗∈Rc\vec{x} \in \mathbb{R}
(V7) c(dx⃗)=(cd)x⃗c(d\vec{x}) = (cd)\vec{x}
(V8) (c+d)x⃗=cx⃗+dx⃗(c+d)\vec{x} = c\vec{x} + d\vec{x}
(V9) c(x⃗+y⃗)=cx⃗+cy⃗c(\vec{x} + \vec{y}) = c\vec{x} + c\vec{y}
(V10) 1x⃗=x⃗1\vec{x} = \vec{x} copy the rest down

Note: The zero vector is 0⃗=(0,⋯ ,0)\vec{0} = (0, \cdots, 0) and the inverse (−x⃗)(-\vec{x}) is (−1)x⃗(-1)\vec{x}
we define the operation of subtraction by x⃗−y⃗=x⃗+(−1)y⃗\vec{x}-\vec{y} = \vec{x} + (-1)\vec{y}

8/1/20

Parallelogram Rule: When adding vectors, the result is the diagonal of the parallelogram formed by the two vectors. The difference of the vectors works similarly.

Pro\vec{v_i}ng the diagonals of a parallelogram are parallel:
Let u⃗\vec{u} and v⃗\vec{v} be sides of a parallelogram with point EE being the intersection of both diagonals of this parallelogram. Note that u⃗\vec{u} and v⃗\vec{v} cannot lie on the same line and as such are not scalar multiples of each other.
One diagonal can be expressed as u⃗−v⃗\vec{u} - \vec{v} and other other as u⃗+v⃗\vec{u} + \vec{v}.

Definition - Linear Combination: Let v1⃗,v2⃗,⋯ ,vk⃗\vec{v_1} , \vec{v_2} , \cdots , \vec{v_k} be kk vectors from Rn\mathbb{R}^n. Any sum in the form:

c1v1⃗+c2v2⃗+⋯+ckvk⃗ ∣c1,⋯ ,ck∈Rnc_1 \vec{v_1} + c_2 \vec{v_2} + \cdots + c_k \vec{v_k}\ | c_1, \cdots, c_k \in \mathbb{R}^n

is called a linear combination of the vectors v1⃗,v2⃗,⋯ ,vk⃗\vec{v_1} , \vec{v_2} , \cdots , \vec{v_k}.

Definition - Span: Let B={c1v1⃗,c2v2⃗,⋯ ,ckvk⃗}B = \{ c_1 \vec{v_1}, c_2 \vec{v_2}, \cdots, c_k \vec{v_k}\} be a set of vectors in Rn\mathbb{R}^n. We define the span of BB by

Span(B)={c1v1⃗+c2v2⃗+⋯+ckvk⃗ ∣c1,⋯ ,ck∈Rn}Span(B) = \{ c_1 \vec{v_1} + c_2 \vec{v_2} + \cdots + c_k \vec{v_k}\ | c_1, \cdots, c_k \in \mathbb{R}^n \}

We say that SpanBB is spanned by BB and that BB is a spanning set for SpanBB.

Theorem unnamed: Let v1⃗,v2⃗,⋯ ,vk⃗∈Rn\vec{v_1}, \vec{v_2}, \cdots, \vec{v_k} \in \mathbb{R}^n. Some vector vi⃗,1≤i≤k\vec{v_i}, 1 \leq i \leq k can be written as a linear combination of v1⃗,v2⃗,⋯ ,vi−1⃗,vi+1,⋯ ,vk⃗⃗\vec{v_1}, \vec{v_2}, \cdots, \vec{v_{i-1}}, \vec{v_{i+1}, \cdots , \vec{v_k}} if and only if

Span{v1⃗,⋯ ,vk⃗}=Span{v1⃗,v2⃗,⋯ ,vi−1⃗,vi+1,⋯ ,vk⃗⃗}Span\{\vec{v_1},\cdots,\vec{v_k}\}=Span\{\vec{v_1}, \vec{v_2}, \cdots, \vec{v_{i-1}}, \vec{v_{i+1}, \cdots , \vec{v_k}}\}

alternatively

Theorem (p. 10): Let S={v1⃗,v2⃗,⋯ ,vk⃗}S = \{ \vec{v_1}, \vec{v_2}, \cdots, \vec{v_k} \} be a set of vectors in Rn\mathbb{R}^n. For all ii satisfying 1≤i≤k1 \leq i \leq k, the vector vi⃗\vec{v_i} can be written as a linear combination of the vectors in S−{vi⃗}S - \{ \vec{v_i} \} if and only if

Span(S)=Span(S−{vi⃗})Span(S) = Span(S-\{\vec{v_i}\})

Exercise 1.3: Determine whether [312]\begin{bmatrix} 3 \\ 1 \\ 2 \end{bmatrix} is in Span{[110],[101],[011]}.Span\{ \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} \}.
We determine if there exists c1,c2,c3∈Rc_1,c_2,c_3 \in \mathbb{R} such that c1[110]+c2[101]+c3[011]c_1 \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} + c_2 \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} + c_3 \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}

10/1/20

Example 1.4:
Let {v1⃗,v2⃗,v3⃗}⊆Rn\{\vec{v_1},\vec{v_2},\vec{v_3}\} \subseteq \mathbb{R}^n.
Prove that v3⃗\vec{v_3} can be written as a linear combination of v1⃗\vec{v_1} and v2⃗\vec{v_2} if and only if

Span{v1⃗,v2⃗,v3⃗}=Span{v1⃗,v2⃗}Span\{\vec{v_1},\vec{v_2},\vec{v_3}\}=Span\{\vec{v_1},\vec{v_2}\}

Proof:
Let {v1⃗,v2⃗,v3⃗}⊆Rn\{\vec{v_1},\vec{v_2},\vec{v_3}\} \subseteq \mathbb{R}^n.
(⇒\Rightarrow) Assume that v3⃗=c1v1⃗+c2v2⃗\vec{v_3} = c_1\vec{v_1} + c_2\vec{v_2} for some c1,c2∈Rc_1,c_2 \in \mathbb{R}.
We prove the set equality by showing each set is a subset of the other.
Certainly Span{v1⃗,v2⃗}⊆Span{v1⃗,v2⃗,v3⃗}Span\{\vec{v_1},\vec{v_2}\} \subseteq Span\{\vec{v_1},\vec{v_2},\vec{v_3}\}.
If x⃗∈Span{v1⃗,v2⃗}\vec{x} \in Span\{\vec{v_1},\vec{v_2}\} then x⃗=d1v1⃗+d2v2⃗\vec{x} = d_1\vec{v_1} + d_2\vec{v_2} for some d1,d2∈Rd_1,d_2 \in \mathbb{R}, and so

x⃗=d1v1⃗+d2v2⃗+0⋅v3⃗\vec{x} = d_1\vec{v_1} + d_2\vec{v_2} + 0 \cdot \vec{v_3}

and hence x⃗∈Span{v1⃗,v2⃗,v3⃗}\vec{x} \in Span\{\vec{v_1},\vec{v_2},\vec{v_3}\}.
Now we show Span{v1⃗,v2⃗,v3⃗}⊆Span{v1⃗,v2⃗}Span\{\vec{v_1},\vec{v_2},\vec{v_3}\} \subseteq Span\{\vec{v_1},\vec{v_2}\}.
If x⃗∈Span{v1⃗,v2⃗,v3⃗}\vec{x} \in Span\{\vec{v_1},\vec{v_2},\vec{v_3}\} then
x⃗=d1v1⃗+d2v2⃗+d3v3⃗\vec{x} = d_1\vec{v_1} + d_2\vec{v_2} + d_3\vec{v_3} for some d1,d2,d3∈Rd_1,d_2,d_3 \in \mathbb{R}.
This means,
x⃗=d1v1⃗+d2v2⃗+d3(c1v1⃗+c2v2⃗)\vec{x} = d_1\vec{v_1} + d_2\vec{v_2} + d_3(c_1\vec{v_1} + c_2\vec{v_2})
x⃗=(d1+d3c1)v1⃗+(d2+d3c2)v2⃗\vec{x} = (d_1 + d_3c_1)\vec{v_1} + (d_2 + d_3c_2)\vec{v_2}
Since d1+d3c1,d2+d3c2∈Rd_1 + d_3c1, d_2+d_3c2 \in \mathbb{R} we have shown x⃗∈Span{v1⃗,v2⃗}\vec{x} \in Span\{\vec{v_1},\vec{v_2}\} by definition. Therefore Span{v1⃗,v2⃗,v3⃗}=Span{v1⃗,v2⃗}Span\{\vec{v_1},\vec{v_2},\vec{v_3}\} = Span\{\vec{v_1},\vec{v_2}\}
(⇐)(\Leftarrow) Assume Span{v1⃗,v2⃗,v3⃗}=Span{v1⃗,v2⃗}Span\{\vec{v_1},\vec{v_2},\vec{v_3}\} = Span\{\vec{v_1},\vec{v_2}\}
Since v3⃗=0⋅v1⃗+0⋅v2⃗+1⋅v3⃗\vec{v_3} = 0 \cdot \vec{v_1} + 0 \cdot \vec{v_2} + 1 \cdot \vec{v_3} we have v3⃗∈Span{v1⃗,v2⃗,v3⃗}\vec{v_3} \in Span\{\vec{v_1},\vec{v_2},\vec{v_3}\}. By our assumption, we must have v3⃗∈Span{v1⃗,v2⃗}\vec{v_3} \in Span\{\vec{v_1},\vec{v_2}\}, and so v3⃗\vec{v_3} is a linearcombination of v1⃗,v2⃗\vec{v_1},\vec{v_2}.
QED

Linear Dependance & Independence

Definition: Let S={v1⃗,⋯ ,vk⃗}S = \{\vec{v_1},\cdots,\vec{v_k}\} be a set of vectors in Rn\mathbb{R}^n. We say that the set SS is linearly dependent if there exists scalars c1,⋯ ,ck∈Rc_1,\cdots,c_k \in \mathbb{R} with at least one cic_i non-zero, such that c1v1⃗+⋯+ckvk⃗=0c_1\vec{v_1} + \cdots + c_k\vec{v_k} = 0
Otherwise we call the set linearly dependent.

Theorem (p. 13): A set is linearly dependent if and only if one vector in the set is in the span of the other vectors in the set.

Characterizing dependence: Tossing in 0⃗\vec{0} will always result in a dependent set.

Theorem (p. 16): If a set of vectors {v1⃗,⋯ ,vk⃗}\{\vec{v_1}, \cdots , \vec{v_k}\} contains the zero vector then the set is linearly dependent.

Remarks:

13/1/20

Week 1 Terminology Review:

Subspaces of Euclidean Spaces

Definition: A subset of Rn\mathbb{R}^n is called a subspace of Rn\mathbb{R}^n if for all x⃗,y⃗,w⃗\vec{x}, \vec{y},\vec{w} in SS and all c,dc,d in R\mathbb{R} we have (V1 through V10 hold)

Note:

Theorem (p.23 Subspace test):
Let SS be a subset of Rn\mathbb{R}^n. If S≠∅S \neq \emptyset and for all x⃗,y⃗∈S\vec{x},\vec{y} \in S and all c∈Rc \in \mathbb{R} we have x⃗+y⃗∈S\vec{x} + \vec{y} \in S and cx⃗∈Sc \vec{x} \in S, then SS is a subspace of Rn\mathbb{R}^n

Theorem: If v1⃗,⋯ ,vk⃗∈Rn\vec{v_1},\cdots,\vec{v_k} \in \mathbb{R}^n, then S=Span{v1⃗,⋯ ,vk⃗}\mathbb{S} = Span\{\vec{v_1},\cdots,\vec{v_k}\} is a subspace of Rn\mathbb{R}^n.

15/1/20

Bases

Since a linearly independent set of vectors is always simpler than a linearly dependent one and a linearly dependent set of vectors can always be reduced to a linearly independent set with the same span; the simplest set of vectors which span some set must be linearly independent.

Definition: Basis
Let S={v1⃗,⋯ ,vk⃗}S = \{ \vec{v_1}, \cdots, \vec{v_k} \} be a subset of rn\mathbb{r}^n. If {v1⃗,⋯ ,vk⃗}\{ \vec{v_1}, \cdots, \vec{v_k} \} is a linearly independent set of vectors in Rn\mathbb{R}^n such that S=Span{v1⃗,⋯ ,vk⃗}S = Span\{ \vec{v_1}, \cdots, \vec{v_k} \}, then the set {v1⃗,⋯ ,vk⃗}\{ \vec{v_1}, \cdots, \vec{v_k} \} is called a basis for SS.
We define the basis set for {0⃗}\{\vec{0}\} to be the empty set ∅\emptyset.

Definition: Standard Basis:
In Rn\mathbb{R}^n, let ei⃗\vec{e_i} represent the vector whose ithi^{th} component is 11 and all other components are 00. The set {e1⃗,...en⃗}\{\vec{e_1},...\vec{e_n}\} is called the standard basis for Rn\mathbb{R}^n.

Lines and Planes

Definition - Line:
A line in Rn\mathbb{R}^n is a subset of Rn\mathbb{R}^n which can be represented using a vector equation of the form

x⃗=b⃗+tm⃗,t∈R\vec{x} = \vec{b} + t \vec{m}, t \in \mathbb{R}

for vectors b⃗\vec{b} and m⃗\vec{m} in Rn\mathbb{R}^n with m⃗≠0\vec{m} \neq 0

Definition - Plane:
A plane in Rn\mathbb{R}^n is a subset of Rn\mathbb{R}^n which can be represented using a vector equation of the form

x⃗=b⃗+su⃗+tv⃗,s,t∈R\vec{x} = \vec{b} + s \vec{u} + t \vec{v}, s,t \in \mathbb{R}

for vectors b⃗,u⃗,v⃗\vec{b},\vec{u},\vec{v} in Rn\mathbb{R}^n with {u⃗,v⃗}\{\vec{u},\vec{v}\} a linearly independent set

17/1/20

Theorem (p. 19): If B={v1⃗,⋯ ,vk⃗}B = \{ \vec{v_1}, \cdots, \vec{v_k} \} is a basis for a subset of SS of Rn\mathbb{R}^n, then every vector in SS can be written as a unique linear combination of the vectors in BB

Proof:
Let B={v1⃗,⋯ ,vk⃗}B = \{ \vec{v_1}, \cdots, \vec{v_k} \} be a basis for S⊆RnS \subseteq \mathbb{R}^n. Since BB is a spanning set for SS, given vx⃗∈S\vec{v_x} \in S, there exists c1,c2,⋯ ,ck∈Rc_1, c_2, \cdots, c_k \in \mathbb{R} such that

vx⃗=c1v1⃗+c2v2⃗+⋯+ckvk⃗\vec{v_x} = c_1\vec{v_1} + c_2\vec{v_2} + \cdots + c_k \vec{v_k}

Now we prove these scalars are unique.
Suppose we also have

vx⃗=d1v1⃗+d2v2⃗+⋯+dkvk⃗\vec{v_x} = d_1\vec{v_1} + d_2\vec{v_2} + \cdots + d_k \vec{v_k}

for some d1,d2,⋯dk∈Rd_1, d_2, \cdots d_k \in \mathbb{R}.
Well then,

c1v1⃗+c2v2⃗+⋯+ckvk⃗=d1v1⃗+d2v2⃗+⋯+dkvk⃗c_1\vec{v_1} + c_2\vec{v_2} + \cdots + c_k \vec{v_k} = d_1\vec{v_1} + d_2\vec{v_2} + \cdots + d_k \vec{v_k}

This implies

(c1−d1)v1⃗+(c2−d2)v2⃗+⋯+(ck−dk)vk⃗=0⃗(c_1 - d_1)\vec{v_1} + (c_2 - d_2)\vec{v_2} + \cdots + (c_k - d_k)\vec{v_k} = \vec{0}

By linear independence of BB, must have (c1−d1)=0,⋯ ,(ck−dk)=0(c_1 - d_1)=0 , \cdots , (c_k - d_k)=0. This means ci=dic_i=d_i and so the scalars are unique.
QED

Definition: Dot Product
Given two vectors vx⃗,vy⃗inRn\vec{v_x}, \vec{v_y} in \mathbb{R}^n the dot product of vx⃗\vec{v_x} and vy⃗\vec{v_y} is defined to be

vx⃗⋅vy⃗=[x1⋮xn]⋅[y1⋮yn]=x1y1+⋯xnyn=∑i=1nxiyi\vec{v_x} \cdot \vec{v_y} = \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} \cdot \begin{bmatrix} y_1 \\ \vdots \\y_n \end{bmatrix} = x_1y_1 + \cdots x_ny_n = \sum_{i=1}^{n}x_iy_i

Theorem: Properties of dot product
If x⃗,y⃗,z⃗∈y⃗\vec{x}, \vec{y}, \vec{z} \in \vec{y} and s,t∈Rs,t \in \mathbb{R}, then we have the following:

  1. x⃗⋅x⃗≥0\vec{x} \cdot \vec{x} \geq 0 and x⃗⋅x⃗=0\vec{x} \cdot \vec{x} = 0 if and only if x⃗=0\vec{x} = 0
  2. x⃗⋅y⃗=y⃗⋅x⃗\vec{x} \cdot \vec{y} = \vec{y} \cdot \vec{x}
  3. x⃗⋅(sy⃗+tx⃗)=s(x⃗⋅y⃗)+t(x⃗⋅z⃗)\vec{x} \cdot (s \vec{y} + t \vec{x}) = s(\vec{x} \cdot \vec{y}) + t(\vec{x} \cdot \vec{z})

Definition: Norm
Given a vector vx⃗\vec{v_x} in Rn\mathbb{R}^n the length or norm of vx⃗\vec{v_x} is defined to be

∣∣vx⃗∣∣=vx⃗⋅vx⃗||\vec{v_x}|| = \sqrt{\vec{v_x} \cdot \vec{v_x}}

Theorem: Properties of the norm
If x⃗,y⃗∈Rn\vec{x}, \vec{y} \in \mathbb{R}^n and c∈Rc \in \mathbb{R} then we have the following:

  1. ∣∣x⃗∣∣≥0||\vec{x}|| \geq 0 and ∣∣x⃗∣∣=0||\vec{x}|| = 0 if and only if x⃗=0⃗\vec{x} = \vec{0}
  2. ∣∣cx⃗∣∣||c\vec{x}|| = ∣c∣⋅∣∣x⃗∣∣|c| \cdot ||\vec{x}|| (note the absolute value on cc)
  3. ∣x⃗⋅y⃗∣≤∣∣x⃗∣∣⋅∣∣y⃗∣∣| \vec{x} \cdot \vec{y}| \leq ||\vec{x}||\cdot||\vec{y}||
  4. ∣∣x⃗+y⃗∣∣≤∣∣x⃗∣∣+∣∣y⃗∣∣||\vec{x} +\vec{y}|| \leq ||\vec{x}|| + ||\vec{y}||

Definition: Angle between vectors
Given vx⃗,vy⃗\vec{v_x},\vec{v_y} in Rn\mathbb{R}^n the angle between vx⃗\vec{v_x} and vy⃗\vec{v_y} is defined to be a real number θ\theta satisfying the equation

vx⃗⋅vy⃗=∣∣vx⃗∣∣⋅∣∣vy⃗∣∣cosθ\vec{v_x} \cdot \vec{v_y} = ||\vec{v_x}|| \cdot ||\vec{v_y}|| cos\theta

Definition: Orthogonal
Two vectors vx⃗\vec{v_x} and vy⃗\vec{v_y} in Rn\mathbb{R}^n are said to be orthogonal when they satisfy vx⃗⋅vy⃗=0\vec{v_x} \cdot \vec{v_y} = 0

Theorem:
The zero vector is orthogonal to every vector in Rn\mathbb{R}^n

5/2/20

Rotations in R2\mathbb{R}^2

ROtation operator: If we rotate a vector x⃗∈r2\vec{x} \in r^2 through angle θ\theta in the counter-clockewise direction then the resulting ve tor is given by

Rθ([x1x2])=[x1cosθ]R_{\theta}(\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}) = \begin{bmatrix} x_1cos\theta \end{bmatrix}

Projections in R2\mathbb{R}^2

Projection operator: If we project a vector x⃗\vec{x} onto vector v⃗\vec{v}, then the resulting vector is given by

projecv⃗(x⃗)=(x⃗⋅v⃗∣∣v⃗∣∣2)v⃗ projec_{\vec{v}}(\vec{x}) = (\frac{\vec{x} \cdot \vec{v}}{||\vec{v}||^2})\vec{v}

projv1,v2(x1,x2)=(x1v1+x2v2)∣∣v⃗∣∣2[v1v2]=[(x1v1+x2v2)v1∣∣v⃗∣∣2(x1v1+x2v2)v2∣∣v⃗∣∣2]=[v12∣∣v⃗∣∣2x1+v1v2∣∣v⃗∣∣2x2v1v2∣∣v⃗∣∣2x1+v22∣∣v⃗∣∣2x2]proj_{v_1,v_2}(x_1,x_2) = \frac{(x_1v_1 + x_2v_2)}{||\vec{v}||^2} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} = \begin{bmatrix} \frac{(x_1v_1 + x_2v_2)v_1}{||\vec{v}||^2} \\ \frac{(x_1v_1 + x_2v_2)v_2}{||\vec{v}||^2} \end{bmatrix} = \begin{bmatrix} \frac{v_1^2}{||\vec{v}||^2}x_1 + \frac{v_1v_2}{||\vec{v}||^2}x_2 \\ \frac{v_1v_2}{||\vec{v}||^2}x_1 + \frac{v_2^2}{||\vec{v}||^2}x_2 \end{bmatrix}

Reflections in R2\mathbb{R}^2

Reflection operator: Let L be a line in R2\mathbb{R}^2 that passes through the origin and ahs normal vector n⃗\vec{n}. If we reflect a vector x⃗\vec{x} in the line LL, then the resulting vector is given by

reflL(x⃗)=x⃗−2projn⃗(x⃗)refl_L(\vec{x}) = \vec{x} - 2proj_{\vec{n}}(\vec{x})

Summary

ALl of these important functions on R2\mathbb{R}^2 (scaling rotation, projection, reflection) have some common properties:

What does it mean to be linear

Here are defining features in terms of algebra:

f(x+y)=f(x)+f(y)f(x + y) = f(x) + f(y) and f(cx)=cf(x)f(cx) = cf(x)

Functions on Euclidean spaces

f:Rn→Rmf : \mathbb{R}^n \rightarrow \mathbb{R}^m

Definition: Two functions f:Rn→Rmf : \mathbb{R}^n \rightarrow \mathbb{R}^m and g:Rn→Rmg: \mathbb{R}^n \rightarrow \mathbb{R}^m are said to be equal if f(x⃗)=g(x⃗)f(\vec{x}) = g(\vec{x}) for all x⃗∈Rm\vec{x} \in \mathbb{R}^m

Linear mappings

Definition: A function f:Rn→Rmf: \mathbb{R}^n \rightarrow \mathbb{R}^m is called a linear mapping if for all vectors x⃗,y⃗∈Rn\vec{x}, \vec{y} \in \mathbb{R}^n and scalars c,d∫rrc,d \int rr we have

f(cx⃗+dy⃗)=cf(x⃗)+df(y⃗)f(c\vec{x} + d\vec{y}) = cf(\vec{x}) + df(\vec{y})

Exercise 3.4: Determine which of the functions given below are linear mappings and which are not

f(x1,x2)=(x12,x22)f(x_1, x_2) = (x_1^2, x_2^2)

Let x⃗=(−1,2)\vec{x} = (-1,2) and y⃗=(−1,2)\vec{y} = (-1,2) we show f(x⃗+y⃗)≠f(x⃗)+f(y⃗)f(\vec{x} + \vec{y}) \neq f(\vec{x}) + f(\vec{y})
f(x⃗)=f(−1,2)=(1,4)=f(y⃗)f(\vec{x}) = f(-1,2) = (1,4) = f(\vec{y})
implies f(x⃗)+f(y⃗)=(1,4)+(1,4)=(2,8)f(\vec{x}) + f(\vec{y}) = (1,4) + (1,4) = (2,8)
But f(x⃗+y⃗)=f(−2,4)=(4,16)f(\vec{x} + \vec{y}) = f(-2,4) = (4,16)
and so f(x⃗+y⃗)≠f(x⃗)+f(y⃗)f(\vec{x} + \vec{y}) \neq f(\vec{x}) + f(\vec{y})

g(x1,x2)=(x2,1,x1)g(x_1,x_2) = (x_2,1,x_1)

Let x⃗=(1,2)\vec{x} = (1,2) and c=2c=2
We will show g(2x⃗)≠2g(x⃗)g(2\vec{x}) \neq 2g(\vec{x})
g(x⃗)=g(1,2)=(2,1,1)g(\vec{x}) = g(1,2) = (2,1,1)
implies 2g(x⃗)=(4,2,2)2g(\vec{x}) = (4, 2, 2)
But g(2x⃗)=g(2,4)=(4,1,2)g(2\vec{x}) = g(2,4) = (4, 1, 2)
and so 2g(x⃗)≠g(2x⃗)2g(\vec{x}) \neq g(2\vec{x})

h(x1,x2,x3)=(2x1,+x2,x3)h(x_1, x_2, x_3) = (2x_1, + x_2, x_3)

Let y⃗,z⃗∈R3\vec{y}, \vec{z} \in \mathbb{R}^3 and c,d∈rrc,d \in rr.
Then y⃗=(y1,y2,y3),z⃗=(z1,z2,z3)\vec{y} = (y_1,y_2,y_3), \vec{z} = (z_1,z_2,z_3).
So cy⃗+dz⃗=(cy1+dz1,cy2+dz2,cy3+dz3)c\vec{y} + d\vec{z} = (cy_1 + dz_1, cy_2 + dz_2, cy_3 + dz_3)
We have ch(y⃗)+dh(z⃗)=c(2y1+y2,y3)+d(2z1+z2,z3)ch(\vec{y}) + dh(\vec{z}) = c(2y_1 + y_2, y_3) + d(2z_1 + z_2, z_3)
=2(2cy1+cy2+2dz1+dz2,cy3+dz3)= 2(2cy_1 + cy_2 + 2dz_1 + dz_2, cy_3 + dz_3)
=(2(cy1+dz1)+(cy2+dz2),cy3+dz3)= (2(cy_1 + dz_1) + (cy_2 + dz_2), cy_3 + dz3) =h(cy1+dz1,cy2+dz2,cy3+dz3)= h(cy_1 + dz_1, cy_2 + dz_2, cy_3 + dz_3)
=h(cy⃗+dz⃗)=h(c\vec{y} + d\vec{z})
Therefore hh is linear.

Projections are linear mappings

Fix vvv∈Rnvvv \in \mathbb{R}^n and consider the associated function projvvv:Rn→Rnproj_{vvv}: \mathbb{R}^n \rightarrow \mathbb{R}^n. Prove that this function is a linear mapping.

7/2/20

Matrix representation of linear mappings

We will prove the follwoing result in this section:

A function f:Rn→Rmf : \mathbb{R}^n \rightarrow \mathbb{R}^m is a linear mapping if and only if there exists an m x n matrix AA such that f(x⃗)=Ax⃗f(\vec{x}) = A\vec{x} for all x⃗∈Rn\vec{x} \in \mathbb{R}^n.

We prove one implication now: If f(x⃗)=Ax⃗f(\vec{x}) = A\vec{x} for all x⃗∈Rn\vec{x} \in \mathbb{R}^n, then for all y⃗,z⃗∈Rn\vec{y}, \vec{z} \in \mathbb{R}^n and c,d,∈rrc,d, \in rr

f(cy⃗+dz⃗)=A(cy⃗+dz⃗)=[r⃗1⋅(cy⃗+dz⃗)⋮r⃗m⋅(cy⃗+dz⃗)]=[c(r⃗1⋅y⃗)+d(r⃗1⋅z⃗)⋮c(r⃗m+y⃗)+d(r⃗m⋅z⃗)] \begin{array}{rcl} f(c\vec{y} + d\vec{z}) = A(c\vec{y} + d\vec{z}) = \begin{bmatrix} \vec{r}_1 \cdot (c\vec{y} + d\vec{z}) \\ \vdots \\ \vec{r}_m \cdot (c\vec{y} + d\vec{z}) \end{bmatrix} \\ = \begin{bmatrix} c(\vec{r}_1 \cdot \vec{y}) + d(\vec{r}_1 \cdot \vec{z}) \\ \vdots \\ c(\vec{r}_m + \vec{y}) + d(\vec{r}_m \cdot \vec{z}) \end{bmatrix} \end{array}

If L:Rn→RmL : \mathbb{R}^n \rightarrow \mathbb{R}^m is a linear mapping, then the vectors L(e⃗1),⋯ ,L(e⃗n)L(\vec{e}_1),\cdots,L(\vec{e}_n), (the images of the standard basis vectors under L) completely determine a formula for L(x⃗)L(\vec{x}). Note that we have

[x1x2⋮xn]=x1[10⋮0]+x2[10⋮0]+⋯xn[10⋮0]\begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix} = x_1 \begin{bmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{bmatrix} + x_2 \begin{bmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{bmatrix} + \cdots x_n \begin{bmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{bmatrix}

This representation of x⃗\vec{x} and the linearity of LL gives us the formula

L(x⃗)=x1e⃗1+⋯+xne⃗n=x1L(e⃗1)⋯+xnL(e⃗n)L(\vec{x}) = x_1\vec{e}_1 + \cdots + x_n\vec{e}_n = x_1L(\vec{e}_1) \cdots + x_nL(\vec{e}_n)

Theorem: If L:Rn→RmL: \mathbb{R}^n \rightarrow \mathbb{R}^m is a linear mapping then for all x⃗∈Rn\vec{x} \in \mathbb{R}^n we have

L(x⃗)=[L(e⃗1)L(e⃗2)⋯L(e⃗n)]L(\vec{x}) = [L(\vec{e}_1)L(\vec{e}_2)\cdots L(\vec{e}_n)]

Standard matrix of a linear mapping

Definition: Let L:Rn→RmL: \mathbb{R}^n \rightarrow \mathbb{R}^m is a linear mapping. The matrix

[L]=[L(e⃗1)L(e⃗2)⋯L(e⃗n)][L] = [L(\vec{e}_1)L(\vec{e}_2)\cdots L(\vec{e}_n)]

is called the standard matrix of LL

Example 3.8: Determine the standard matrix of refll(x1,x2)refl_l(x_1,x_2) where ll is the line 2x1−3x2=02x_1 - 3x_2 = 0 in R2\mathbb{R}^2

refll(x⃗)=x⃗−projn⃗(x⃗)refl_l(\vec{x}) = \vec{x} - proj_{\vec{n}}(\vec{x}) where n=(2,−3)n = (2,-3) So, refl(1,0)=(1,0)−2proj(2,−3)(1,0)=(1,0)−2((2,−3)⋅(1,0)13)(1,−3)ref_l(1,0)=(1,0) - 2proj_{(2,-3)}(1,0) = (1,0) - 2(\frac{(2,-3)\cdot(1,0)}{13})(1,-3)
=(1,0)−413(2,−3)= (1,0) - \frac{4}{13}(2,-3)
=(513,1213)= (\frac{5}{13}, \frac{12}{13})
refl(0,1)=(1213,−513)refl_(0,1) = (\frac{12}{13}, \frac{-5}{13})
Therefore, [refll]=[51312131213−513][refl_l] = \begin{bmatrix} \frac{5}{13} \frac{12}{13} \\ \frac{12}{13} \frac{-5}{13} \end{bmatrix}

Matrix equality

Let AA and BB be two m x n matrices.
We say that AA and BB are equal if their corresponding entries are equal.

Let aija_{ij} denote the entries in the ithi^{th} row and the jthj^{th} column of AA.
Let bijb_{ij} denote the entries in the ithi^{th} row and the jthj^{th} column of AA.

Defintion: A=B  ⟺  aij=bijA = B \iff a_{ij} = b_{ij} for all i=1,⋯ ,mi = 1, \cdots, m and j=1,⋯ ,nj = 1, \cdots, n

Theorem (Matrices equal theorem) If AA and BB are m x n matrices, then A=BA=B if and only if Ax⃗Bx⃗A\vec{x} B\vec{x} for all x⃗∈Rn\vec{x} \in \mathbb{R}^n

Proof: It is clear that if A = B then Ax⃗=Bx⃗A\vec{x} = B\vec{x} for all x⃗∈Rn\vec{x} \in \mathbb{R}^n.
Now suppose that A=[vva1⋯vvan]A = [vva_1 \cdots vva_n] and B=[vvb1⋯vvbn]B = [vvb_1 \cdots vvb_n] and Ax⃗=Bx⃗A\vec{x} = B\vec{x} for all x∈Rnx \in \mathbb{R}^n. It follows that Ae⃗i=Be⃗iA\vec{e}_i = B\vec{e}_i for all i=1,⋯ ,ni = 1, \cdots, n.
Recall that we showed earlier that Ae⃗i=vvaiA\vec{e}_i = vva_i and Be⃗i=vvbiB\vec{e}_i = vvb_i which means we must have vvai=vvbivva_i = vvb_i hence A=bA=b

We have established that if f:Rn→Rmf : \mathbb{R}^n \rightarrow \mathbb{R}^m is a linear mapping if and only if there exists an m x n matrix AA such that f(x⃗)=Ax⃗f(\vec{x}) = A\vec{x} for all x⃗∈Rn\vec{x} \in \mathbb{R}^n

Compositions of linear mappings and matrix representations

Compositions in R2\mathbb{R}^2

7/2/20

17/1/20

17/1/20


latex reference for me to write this

o⃗\vec{o}

f(x)=x2+2x−1(x−23)32f(x) = \frac{x^2+2x-1}{(x-23)^{32}}

Let's try matrices

[12⋯456⋯7⋮⋮⋱⋮12131415]\begin{bmatrix} 1 & 2 & \cdots & 4 \\ 5 & 6 & \cdots & 7 \\ \vdots & \vdots & \ddots & \vdots \\ 12 & 13 & 14 & 15 \end{bmatrix}


this is an inline matrix [1234] \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}