Linear Algebra

Linear Algebra (Elementary)

Vectors

Vectors are usually represented as column of numbers that encode a direction and magnitude.

v=(x1x2xn)

The magnitude of a vector can be determined by summing the square of each term in the column and square rooting the result.

|v|=x12+x22++xn2=n=1xn2

Dot Product

The Dot product of two vectors is

AB=|A||B|cosθ

And

AB=n=1anbn

Look at derivation of the formula here


Cross Product

The cross product of two vectors creates another vector that is perpendicular to both vectors.

A×B=|A||B|sinθ n^

Where n^ is a unit vector perpendicular to A and B. The direction of n^ can be determined using the right hand grip rule.

Pasted image 20250423155913.png|centre | 200

Your fingers curl from vector a to b, while your thumb represents the direction of a×b

Thus

A×B=B×A

The determinant trick to finding cross product.

(a1a2a3)×(b1b2b3)=(a2b3b2a3(a1b3b1a3)a1b2b1a2)
  1. Cover up the first row
  2. Multiply both sides diagonally and subtract it. (First element)
  3. Cover up second row
  4. Multiply both sides diagonally and subtract it. Multiply by -1. (Second element)
  5. Cover up third row
  6. Repeat step 2 (third element)

Area bounded by Vectors

Pasted image 20250423155837.png|centre | 300

The area of the parallelogram can be deduced. Let u be the base and h be the height. The Area would be |u|h. h can be expressed as.

h=|v|sinθ

Thus

|u|h=|u||v|sinθ=|u×v|

Thus the area of the parallelogram can be determined by the magnitude of the cross product of u and v.

Sample qn: Prove that the volume of a cuboid is. (This result is widely used in determinants and cross products)

Volume of Cuboid=|a(b×c)|

Points, Lines, Planes

Point

A point is self-evidently a point in 3d space.

Lines

Starting from what we know best

y=mx+b

A line in a vector space can be described as

r^=a^+tb^

Distance between Point and Line

The distance between c^ and r^=a^+tb^ is

d=1||b^||||(c^a^)×b^||

Planes

Starting from what we know. The equation of a plane in Cartesian form is

ax+by+cz=D

Using the properties of dot product, it can be rewritten as

(xyz)(abc)=D

or

rn^=D

where n^ is the normal vector of the plane. And r is a vector that lies on the plane

Line of Intersection between two planes

Given two planes

x+y+z=12x+3y+z=5

The line of intersection can be found by keying this into GDC (menu - 3 - 2)
Pasted image 20250712194534.png|centre| 400

Thus

x=2z2y=z+3z=z x+22=y31=z(xyz)=(230)+λ(211)

Intersection of Planes

Given three planes (1,2,3), the plane must intersect at a unique point when

n1(n2×n3)0

However, the planes has 0 or solutions when

n1(n2×n3)=0
Distinguishing between no solutions & Infinite solutions

! If n1(n2×n3)=0:

  1. Find l : the line of intersection between n2 and n3
l=(abc)+λ(n2×n3)
  1. Check if the below condition is true. If yes, then (a,b,0) lies on 3, suggesting that there are infinite solutions. If not, there are no solutions
(abc)n1=D3

Distance between two parallel planes

where D1 and D2 are rn=D1 and rn=D2.

d=D2D1||n||

Linearity

Formal definition of Linearity #Linearity

  1. Additivity: L(v+w)=L(v)+L(w)
  2. Scaling: L(cv)=c L(v)

Where L is a linear transformation on a corresponding vector.

Matrices

Recall how a function in algebra transforms x to y?

f(x)=y

In linear algebra, instead of x and y's which are scalar values, linear algebra transforms vectors into another vector.

f(x)=y

However, to make the distinction clearer, mathematicians use A instead of f.

Ax=b

We need special tools to work with vectors, and this is where matrices comes in. A matrix encodes a Linear transformation on a vector, similar to how a function (f) encodes a transformation of x to y.

eg.

(1234)x^=y^

where A is a matrix and A=(1234)

(1234)(x1x2)=(y1y2)

Note that the dim of a vector has to be the same as the number of columns of matrix (A).


Matrix Multiplication (How does it transform between x^ to y^?)

Matrix multiplication

  1. Take the nth row of numbers in A
  2. Pivot it clockwise by 90 degrees into the mth column in x^
  3. Multiply it respectively with the variable associated with it
  4. Add up all the numbers in the column
  5. The value would be on the nth row and mth column in y^
(abcd)(xy)=(ax+bycx+dy)

Thus

(1234)(x1x2)=(x1+2x23x1+4x2)

Bravo!! We have transformed x^ into a completely new vector y^ !!


System of Linear Equations

A matrix also encodes a system of linear equations. Suppose there are 2 equations as shown, and we want to solve for a and b.

{a+b=202a+b=23

A matrix representation of the above is as given

(1121)(ab)=(a+b2a+b)=(2023)

look, aren't they equivalent??

Solving for the coefficients are as easy as

(ab)=(1121)1(2023)

Where the inverse of the matrix is essentially the reverse of its transformation, similar to how f:xy , thus f1:yx . Note, the inverse does not exist if the transformation is not one to one. But for square matrices, there is always an inverse 99% of the time.


Transpose

Transpose means to flip a vector or a matrix around a diagonal #Transpose

(x0x1x2)T=(x0x1x2)

Thus

vTv=vv

In the case of matrices

(a00a01a02a10a11a12)T=(a00a10a01a11a02a12)

Another property is that ATA always result in a square matrix. As one matrix transforms a vector m×1 to n×1, and the other transforms it from n×1 to m×1. Together, the two transformation transforms a vector from m×1 to m×1. Which is a property of a square matrix.


Determinant

Determinant measures the transformation of space and volume.

A matrix that maps basis vector e1.e2,e3 to vectors a,b,c can be expressed as.

A=[abc]

The volume by the three basis vectors is given as ϵ3 or |e|3

The determinant, measures ratio between the initial volume of three basis vectors, and its final volume after being scaled by A.

det(A)=(a×b)c

where (a×b)c is the volume of the cuboid.

det(A)=c1(a2b3b2a3)c2(a1b3b1a3)+c3(a1b2b1a2)

Fun fact

a×b=det(ia1b1ja2b2ka3c3)

The determinant tells us about the invertibility of the Matrix


Eigenvector and Eigenvalue

An eigenvector of a matrix is a nonzero vector that, when the matrix is applied to it, is scaled by a factor λ (the eigenvalue) but does not change direction.

Av=λvAvλv=0(AλI) v=0

A linear system Mx=0 has non zero solution of x if det(M)=0. (Suggesting that M is singular).

Thus to find non zero solution of v.

det(AλI)=0

Solving for λ would allow us to solve for eigenvector v.


Linear Algebra (Modern)

Infinite Vectors and Functional Spaces

"The only thing limiting us in Math is our imagination" ~ Joshua

Functions are vectors. What? Yes it's true. All functions are an infinite vector and these infinite vectors live within something called a Functional Space.

Introduction to Infinite-dimensional vectors functions

Take a function f(x). Suppose we get all values of f(x) from 0xn . And formulate them in a vector.

f(x)=(f(0)f(0.001)f(n))

Orthogonal Basis

Suppose f(x)=sinx. Since sin is an oscillatory function, the domain of x that we are interested in is thus x{R|0x2π}

Recall that in Euclidean space, a linear combination of two orthogonal (perpendicular) vectors, i^ and j^ can describe any point on the plane? Similarly, to describe any point/functions within this Functional space, we want to find orthogonal vectors or functions.

Thus we need to find two functions where its dot product is 0.

f^(x)g^(x)=0

When dealing with finite vectors, the dot product is defined as such, where each element in the vector is multiplied and summed together.

A^B^=n=1anbn

Similarly, in the context of infinite vectors, it is defined as

f^(x)g^(x)=f(x) g(x) dx

Fourier discovered that the two functions f(x) and g(x) are sinx and cosx respectively. As

02πsinxcosx dx=0

Thus, sin and cos act as orthogonal basis vectors in Functional space. Proving that every single function can be expressed as a linear combination of sin and cos waves.

References

  1. https://www.youtube.com/watch?v=dT30kLnQNUE