Module 5 -- Vector Spaces -- Continued


Index

  1. Eigenvalues and Eigenvectors
  2. The Cayley-Hamilton Theorem
  3. Symmetric matrices
  4. Diagonalization of matrices (symmetric matrices)
  5. Orthogonal Matrix
  6. Gram-Schmidt Orthogonalization

Eigenvalues and Eigenvectors

https://www.youtube.com/watch?v=PFDu9oVAE-g (must watch this)

Given a square matrix, A , an eigenvector is a non-zero vector v such that:

Av = λv

where λ is the corresponding eigenvalue.

In words:

An eigenvector of A is a direction that A simply stretches or compresses (by the factor λ), but does not rotate or mix with other directions.


Breakdown of the Equation


How to find Eigenvalues and Eigenvectors

Step 1: The Characteristic polynomial

Rewriting:

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

Nontrivial solutions (v  0) exist only when:

det(A  λI) = 0

This is called the characteristic equation.


Step 2: Find Eigenvectors

For each eigenvalue λ found above:


Detailed Example

Let's use :

A = [2112]

Step 1: Find the eigenvalues

https://www.youtube.com/watch?v=e50Bj7jn9IQ (This is a video showing a quick trick for calculating eigenvalues, since the more bigger a matrix is, the more complex the equations will be, might get harder to solve.)

We can get that from the characteristic equation :

det(A  λI) = 0

First:

A  λI[2112]  λ[1001]= [2112]  [λ00λ]= [2λ112λ]

Now,

det(A  λI)|2λ112λ|= (2  λ)2  1= (4  4λ +λ2) 1= λ2  4λ +3

Now we equate that to zero.

det(A  λI) = 0λ2  4λ +3 = 0

And after doing some basic factorization:

(λ3)(λ1) = 0

So the eigenvalues are:

λ1 =3, λ2 = 1

Step 2: Find eigenvectors for each eigenvalue

From the equation:

A  λI

For λ1 = 3,

 [2λ112λ] = [231123] = [1111]

Now we equate the rows and columns to a vector v where:

v = [xy]

Applying to both the rows, we get two equations:

x + y = 0x  y =0

From the first equation:

y = x

And from the second equation:

x = y

So all vectors are of the form:

v = [11]

(or any scalar multiple) are eigenvectors with eigenvalue λ = 3

Now, for λ = 1

 [2λ112λ] = [211121] = [1111]

So from either row we get the equation:

x + y = 0

So,

x = y

So, all vectors of the form:

v = [11]

(or any scalar multiple) are eigenvectors with eigenvalue λ = 1


Why Are Eigenvectors and Eigenvalues Important?


The Cayley-Hamilton Theorem

https://www.youtube.com/watch?v=TNxmupelc-4&list=PLF-vWhgiaXWPZ7Ogw6zIZMg4aqUXEwrnJ&index=9 (must watch)

What is the Cayley-Hamilton Theorem?

Or, in very very simple terms,

For a given matrix An×n, we have to prove that:

(A  λI) = 0

which is often called the characteristic equation.


Example

Let's use the one given in the video.

Pasted image 20250810132922.png

Given matrix:

A = [120210001]

Now, there are two ways to go about this.

Step 1: Write the characteristic equation:

A  λI = 0

Method 1: We find the eigenvalues, substitute them back into the characteristic equation's LHS and then find out if it equates to the RHS.

Method 2: We follow the steps given in the video.

Let's try method 1.


Step 2: Find the eigenvalues

[120210001]  [λ000λ000λ][1λ2021λ0001λ]

Now, find the determinant of this matrix:

=(1  λ)[(1+λλ + λ2]  2[22λ  0] + 0=(1λ)[1 + λ2]  [4  4λ] 1 + λ2 + λ  λ3  4 + 4λ = 0 λ3 + λ2 + 5λ  5 = 0

Now it is gonna be a massive pain to solve this equation and find the damn roots.

And I am not kidding about this.

Skip ahead to Let's use the given roots to see if method 1 works in theory or not. to see if this approach pans out or not, and then I will show the easy approach to continue from once we have found the equation (from the video, method 2)

Here's what a search on perplexity did, a massive rabbit hole.


Perplexity(GPT 4.1)'s solution for the cubic equation.

Ah yes now I caught the sign mistake, lamda^3 should have a negative sign. Now then that we have this equation, what would be it's roots?

(I had previously made an error in the sign for λ3 which I spent 30 minutes debugging since I skipped a lot of the math and did it in my head, retracing the steps manually took time)

Great! Now that we have the correct characteristic equation:

λ3λ25λ+5=0

Let's find its roots.


Analytical Approach

This cubic is not easily factorable with integers, so let's look for rational roots using the Rational Root Theorem:

Possible rational roots: ±1,±5 (factors of 5 over 1).

Now divide the cubic by (λ1):


Synthetic Division

Divide λ3λ25λ+5 by (λ1):

So, quotient is: λ25.

Therefore:

λ3λ25λ+5=(λ1)(λ25)

Roots of the Quadratic

λ25=0λ=±5

Final Roots

λ1=1λ2=52.236λ3=52.236

Let's use the given roots to see if method 1 works in theory or not.

So we have the roots as:

λ1=1λ2=52.236λ3=52.236

which are the eigenvalues.

The CHT says that:

For a given matrix An×n, we have to prove that:

(A  λI) = 0

or it should result in a 3×3 null matrix:

[000000000]

However, unfortunately that's not the case, as you will see below.

Applying into equation:

A  λI

For λ1 = 1

[120210001]  [100010001] = [020220000]

which unfortunately is not the null matrix.

For λ2 = 2.236

[120210001]  [2.2360002.2360002.236] = [1.2362023.2360001.236]

which also, again, is not the null matrix.

For λ3 = 2.236

[120210001]  [2.2360002.2360002.236] = [3.2362021.2360003.236]

which also, again, is not the null matrix.


Key takeaway?

Sure the roots didn't pan out. But:

We don't have to use this method from the video:

Pasted image 20250810143500.png

which will lead into all sorts of messes to find out the equation of:

λ3 + λ2 + 5λ  5 = 0

which is almost the same in the video:

Pasted image 20250810143622.png

that we can just achieve if we multiply both sides by -1

λ3  λ2  5λ + 5 = 0

But, for continuity's sake, let's not do that and continue with our previously achieved equation:

λ3 + λ2 + 5λ  5 = 0

Remember the end goal here is to check if:

A  λI

equates to zero or not.

So, how do we proceed after this?

We just replace λ with the matrix A.

from the equation:

λ3 + λ2 + 5λ  5 = 0

which is derived from:

A  λI

So the equation becomes:

A3 + A2 + 5A  5 = 0

Now we verify the LHS part only to see if it equates to zero or not.

Also we must add a tweak:

A3 + A2 + 5A  5I = 0

since we are replacing the eigenvalues with entire matrices, every term must be on the same size of the replacement matrix.

Since the last term was just a constant, we can write 5 = 5×1 = 5× I , where I is the corresponding identity matrix.

Why did we do this?

A scalar like 5 cannot be added to or subtracted from a matrix; the objects must be conformable. The identity matrix I acts as the multiplicative identity for matrices, so the constant term is represented as 5I (a matrix with 5 on the diagonal and 0 elsewhere). This way every term is a 3×3 matrix and they can be summed.

So,

A3 + A2 + 5A  5I [120210001]3 + [120210001]2 + 5[120210001]  5[100010001]

Welp, the matrix multiplication is gonna be a pain lol.

So,:

A2 = [120210001] × [120210001][(1×1 + 2×2 + 0)(1×2 + 2×1 + 0)(0 + 0 + 0)(2×1 + 1×2 + 0)(2×2 + 1×1 + 0)(0 + 0 + 0)(0 + 0 + 0)(0 + 0 + 0)(0 + 0 + 1)]= [500050001]

Now,

A3 = [120210001] × A2 =[500050001][(1×5 + 0 + 0)(0 + 2×5 + 0)(0 + 0 + 0)(2×5 + 0 + 0)(0 + 1×5 + 0)(0 + 0 + 0)(0 + 0 + 0)(0 + 0 + 0)(0 + 0 + 1)]= [51001050001]

And lastly,

5A = 5×[120210001]= [51001050005]

and:

5I = [500050005]

Finally arranging them all together:

[51001050001] + [500050001] + [51001050005]  [500050005]= [000000000]

which is now, the null matrix or zero matrix.

Thus:

A  λI = 0

or for a better statement:

p(A) = λ3 + λ2 + 5λ  5 = 0

is proved, which verifies the Cayley-Hamilton Theorem for this matrix.


Symmetric matrices

https://www.youtube.com/watch?v=vSczTbgc8Rc (watch the first two halves of the video to understand all about symmetric matrices)

Definition and basic properties

Pasted image 20250814185919.png

See how the elements on both sides of the diagonal, except the starting and ending element are the same? These are called symmetric matrices.


Diagonalization of matrices (symmetric matrices)

https://www.youtube.com/watch?v=sikqqbbJUXc&list=PLF-vWhgiaXWPZ7Ogw6zIZMg4aqUXEwrnJ&index=13

For a matrix A, it's diagonalized version can be obtained by using this formula:

D = M1A M

where:

M is the modal matrix, which is obtained as follows:

Steps to obtain the modal matrix.

  1. Write the characteristic equation det(A  λ I) = 0
  2. Solve L.H.S to get a characteristic equation of type λ3 ±aλ2 ± bλ ± c
  3. Instead of replacing λ with A, solve the equation to find the roots i.e. the eigenvalues. (Refer to previous sections)
  4. Substitute the eigenvalues in the derived equation to get the eigenvectors in form of:
x1 = [a1b1c1]x2 = [a2b2c2]x3 = [a3b3c3]

Now, the modal matrix M is achieved by:

M = [[a1b1c1][a2b2c2][a3b3c3]]

By writing each eigenvector as the column vectors of the modal matrix.

Then we can calculate the inverse, plug them in the formula, and after doing the math :

We should get a matrix like this

D = [a000b000c]

which is the diagonal matrix. If we don't get this matrix, then it means the given matrix is not diagonalizable.


Example

For example please refer to the examples in the video :

https://www.youtube.com/watch?v=sikqqbbJUXc&list=PLF-vWhgiaXWPZ7Ogw6zIZMg4aqUXEwrnJ&index=13


Orthogonal Matrix

https://www.youtube.com/watch?v=wciU07gPqUE&t=117s (watch this part)

An orthogonal matrix is basically a matrix whose column vectors are orthogonal (perpendicular to each other), and also their dot product would equate to zero.

Pasted image 20250817135734.png

And the column vector's length is always one, hence they are unit vectors.

For example if we take the column vector:

[2222]

we can find the length of this column vector by taking the square root of the sum of the squares of the elements:

(22)2 + (22)2 = (24) + (24) = 12 + 12 = 1 = 1

Same goes for the other column vector, which means these are unit vectors.


Gram-Schmidt Orthogonalization

https://www.youtube.com/watch?v=UOZjINOGLog (must watch)

https://www.youtube.com/watch?v=rHonltF77zI (another way to visualize this)

https://www.youtube.com/watch?v=tu1GPtfsQ7M (example of method 2)