Lecture from 20.09.2024  Video: Videos ETHZ
Vectors Collections and Representations
Sequence of vectors
A sequence of vectors can be represented as a tuple. These elements are ordered and may occur more than once.
Note that when you have an element of no vectors, you get the empty sequence (since you unable to fill the sequence with any vectors).
Set of vectors
Similarly, you can also define a set of vectors. These are unordered “sets” with unique elements (if you have the same vector twice, it’s only “found once” in the set). One can imagine them as being a “bag” out of which we can pick unique vectors.
Sum of vectors
To sum up vectors (i.e. add them up from the origin) we can use the following notation.
Note that when you are summing up no vectors, your position doesn’t change (from the origin where you started at). The origin is defined by the null vector $0$ “bold zero” and is the zero vector in $R_{n}$. Meaning, in 2d you’d have $[00 ]$. In 3d you’d have $ 000 $ and so forth.
Column Vector Builder Notation
Another way of defining vectors is to define how each ith element of a vector produced as a function of i.
In the example in the middle it is important to mention that the “bold zero” is not the number zero but the zero vector (=Nullvector). The zero vector for any $R_{n}$ is a vector of size $n$ filled with zeros. For $R_{0}$ you’ll have an empty vector (since $i=1$ going to $m$ gives you an empty set → no $v_{m}$ element to put into the vector).
Length of a vector
The length (or magnitude) of a vector is a measure of how long the vector is. In mathematics, this is often referred to as the Euclidean norm.
For a vector $v=(v_{1},v_{2},…,v_{n})$, the Euclidean norm is calculated as:
$∣v∣=v_{1}+v_{2}+…+v_{n} =i=1∑n v_{i} $Why Does Squaring and Taking the Square Root Give the Length?
The reason why squaring each component, summing them up, and then taking the square root gives the length of the vector is rooted in Pythagoras’ theorem. This theorem forms the foundation for understanding distances in both 2D, 3D, and higher dimensions.
2D Case
In 2D, consider a vector $v=(v_{1},v_{2})$. You can think of this vector as forming the diagonal of a right triangle, where $v_{1}$ is the length along the $x$axis and $v_{2}$ is the length along the $y$axis. Using Pythagoras’ theorem, we calculate the length of the diagonal (hypotenuse) as:
$∣v∣=v_{1}+v_{2} $This gives the vector’s length in 2D, corresponding to the straightline distance between the origin and the point $(v_{1},v_{2})$.
3D Case
Now consider a vector $v=(v_{1},v_{2},v_{3})$ in 3D space. Here’s how the same reasoning extends:

First, imagine the projection of the vector onto the $xy$plane. The length of this projection (ignoring the $z$axis) is given by the 2D formula:
$Length in thexyplane=v_{1}+v_{2} $ 
Now, treat this projection as one side of a right triangle, and the $z$component, $v_{3}$, as the other side. Applying Pythagoras’ theorem in 3D:
$∣v∣=(v_{1}+v_{2} )_{2}+v_{3} =v_{1}+v_{2}+v_{3} $
Higher Dimensions (4D and Beyond)
This logic naturally extends to higher dimensions. In 4D, the length of a vector $v=(v_{1},v_{2},v_{3},v_{4})$ is found by treating the 3D vector $(v_{1},v_{2},v_{3})$ as one side of a new triangle, with $v_{4}$ being the new perpendicular component:
$∣v∣=(v_{1}+v_{2}+v_{3} )_{2}+v_{4} =v_{1}+v_{2}+v_{3}+v_{4} $This process continues in higher dimensions. The formula $v_{1}+v_{2}+…+v_{n} $ works for any number of dimensions because each new component is added perpendicularly, just like in Pythagoras’ theorem. Each dimension adds a new “side” to the generalized right triangle.
Unit Vectors
A unit vector is a vector that has a length of 1. It points in the same direction as the original vector but has been scaled down to have a magnitude of 1. Unit vectors are important because they allow us to represent direction without worrying about the magnitude.
To convert a vector $v$ into a unit vector $v^$, we divide the vector by its length:
$v^=∣v∣v $Why care about Unit Vectors
A unit vector is essentially a “pure” direction vector. While a regular vector contains both direction and magnitude (for example, velocity), the unit vector keeps only the direction. Unit vectors are useful in defining directions like $i^$ (unit vector along the $x$axis) or $j^ $ (unit vector along the $y$axis).
In higher dimensions, unit vectors help standardize direction regardless of how many components a vector has. For example, in physics, unit vectors are often used to express forces or velocities as directions independent of magnitude.
Dot Product (Scalar Product)
The dot product, also known as the scalar product or inner product, is an operation that takes two vectors and returns a single scalar (a number). It measures how much two vectors “point” in the same direction.
Given two vectors $a=(a_{1},a_{2},…,a_{n})$ and $b=(b_{1},b_{2},…,b_{n})$, their dot product is defined as:
$a⋅b=a_{1}b_{1}+a_{2}b_{2}+…+a_{n}b_{n}=i=1∑n a_{i}b_{i}$Dot product can be written using the angle $θ$ between the two vectors:
$a⋅b=∣a∣∣b∣cos(θ)$where $∣a∣$ and $∣b∣$ are the magnitudes (lengths) of the vectors, and $θ$ is the angle between them. A simpler way to understand this is to understand that the $cos(θ)$ is equal to the dot product of the normalised vectors.
$cos(θ)=(∣a∣a )⋅(∣b∣b )$Intuition
The dot product gives a sense of how aligned two vectors are:
 When the vectors point in the same direction: The dot product is positive and large. The cosine of a small angle (close to 0) is close to 1, meaning the vectors are nearly parallel.
 When the vectors are perpendicular: The dot product is 0. This happens because $cos(90_{∘})=0$, so the vectors have no overlap in their directions.
 When the vectors point in opposite directions: The dot product is negative. The cosine of an angle near $180_{∘}$ is close to $−1$, meaning the vectors are pointing in opposite directions.
Geometric Intuition
Think of the dot product as a measure of how much one vector contributes to another in terms of direction. Imagine projecting one vector onto the direction of another:
 If the two vectors align perfectly, the projection will be large, giving a large positive result.
 If they are perpendicular, the projection is zero (because there’s no overlap in direction).
 If the vectors are opposite, the projection will be negative, indicating the vectors are pulling in opposite directions.
The dot product is fundamental in determining angles between vectors and checking orthogonality (perpendicularity) in geometry and physics.
Note: If you want to dive deeper into actually why a dot product is related to a projection I suggest you watch this video by 3b1b.
Inequalities to know
CauchySchwarz Inequality
The CauchySchwarz Inequality states that for any two vectors $a$ and $b$, the absolute value of their dot product is less than or equal to the product of their magnitudes:
$∣a⋅b∣≤∣a∣∗∣b∣$Equality holds if and only if the vectors $a$ and $b$ are linearly dependent (i.e., they point in the same or exactly opposite directions).
Proof of the CauchySchwarz Inequality
Triangle Inequality
The Triangle Inequality is a fundamental property of norms (or lengths) in vector spaces. It states that for any two vectors $u$ and $v$, the length of their sum is less than or equal to the sum of their lengths:
$∣u+v∣≤∣u∣+∣v∣$Intuitive Understanding
To understand this inequality intuitively, consider the following:

Imagine two vectors $u$ and $v$ represented as arrows in a plane. The triangle inequality tells us that if you take one arrow (vector) and place the tail of the second arrow at the head of the first arrow, the direct path from the tail of the first arrow to the head of the second arrow (which is the vector sum $u+v$) is always shorter than or equal to the sum of the lengths of the two arrows (the lengths of $u$ and $v$).

This is similar to navigating in a straight line versus taking two segments of a path. The direct route (the length of the vector sum) cannot exceed the total distance traveled along the two segments (the lengths of the individual vectors).
Proof of the Triangle Inequality
Now, let’s prove the triangle inequality using the properties of the magnitude:

Start with the expression for the square of the length of the sum:
$∥u+v∥_{2}=(u+v)⋅(u+v)=∥u∥_{2}+∥v∥_{2}+2(u⋅v)$ 
Apply the CauchySchwarz Inequality:
By the CauchySchwarz inequality, we know:
$∣u⋅v∣≤∥u∥∥v∥$This implies:
$2(u⋅v)≤2∥u∥∥v∥$ 
Combine the results:
From the expression for $∥u+v∥_{2}$, we can substitute the upper bound for the dot product:
$∥u+v∥_{2}≤∥u∥_{2}+∥v∥_{2}+2∥u∥∥v∥$The right side can be factored as:
$∥u+v∥_{2}≤(∥u∥+∥v∥)_{2}$ 
Taking the square root:
Finally, taking the square root of both sides yields:
$∥u+v∥≤∥u∥+∥v∥$
Thus, the triangle inequality is proven.
Continue here: 03 Linear Dependence and Independence