Unfortunately when I was taking linear algebra in college, I didn’t realize just how important it would later in my life. While I do remember plenty of the basics, there is also huge holes in my knowledge of linear algebra. These holes became apparent when I started doing extensive work in the area of data analysis.
It is time to correct this problem.
As a starting point, I will be using the linear algebra videos from 3blue1brown on YouTube to quickly cover the basics. These notes will be covering the first of his videos titled Vectors, what even are they? Essence of linear algebra, chapter 1 available on YouTube here.
Useful Unicode for inputting vector notation in Linux
To input Unicode into Linux, hold down the control and shift key while pressing the ‘u’ key. The ‘u’ will be underlined at that point. Then type in the four digit code for the character that you want to input. Here are the codes that I use to create vector notation in a text document:
u23a7 ⎧ u23ab ⎫
u23aa ⎪ u23aa ⎪
u23a9 ⎩ u23ad ⎭
A dot product is represented by u00b7 ·
A cross product is represented by an x.
While these codes should be useful in all operating systems, the way that they are input will differ.
Vectors are rooted at the origin of the coordinate system
While this isn’t specifically true in all cases, that is the convention that we will be using for the time being. By placing the tail of the vector at the origin of the coordinate system, that makes vector addition and scalar multiplication easy and intuitive. Later, if it becomes necessary, we can take the view of vectors that are at arbitrary places within the coordinate system.
In a two dimensional space, the origin is the point where the x-axis crosses the y-axis. This is usually designated mathematically as the point (0, 0). In a three dimensional space, it is the point where the x-axis, y-axis, and z-axis meet. In three dimensional space, it would be designated by the point (0, 0, 0).
That brings us to our first distinction in linear algebra. In linear algebra, we are working with vectors, not points. To distinguish between them. they are usually written on top of each other and surrounded by square brackets instead of curved brackets.
You can think of the numbers given in a vector as the instructions to get from the tail of the vector to the tip of the vector. The top number tells how far to move on the x-axis, the second number tells how far to move along the y-axis, and the third number (if available) tells how far to move along the z-axis.
This convention can be extended into more than three dimensions if desired.
Vector addition
To add two vectors, imagine both of them with their root at the origin. Then, imagine the second vector moving its root to the tip of the first vector while still maintaining its direction and magnitude. The resulting vector, rooted at the origin, will have its tip at the end of the second vector.
This can be expressed mathematically as follows:
⎧1⎫ ⎧3 ⎫ ⎧ 1+3 ⎫ ⎧4⎫
⎩2⎭ + ⎩-1⎭ = ⎩2+(-1)⎭ = ⎩1⎭
Scaling a vector (multiplication by a number)
A scalar is a number that scales a vector. Pretty well every stand-alone number in linear algebra can be thought of as a scalar. What a scalar does is shrink, extend, and/or change directions of a vector while maintaining its origin and the line upon which it sits.
Negative numbers change the vector’s direction while positive numbers maintain the vector’s direction. The scaling is determined by the magnitude of the number. For example
All you have to do is multiply each component of the vector by the scalar. That has the function of stretching (or shrinking) the vector. And if the scalar is negative, it will also flip the direction of the vector.