Vector Norms, Frobenius Norm, and Determinants
Part 1: Vector Norms + Frobenius Norm + Determinants
Vector Norms
Definition
A norm is a mathematical function used to measure the size, length, or magnitude of a vector or matrix.
The norm of a vector is represented as:
A norm gives a single numerical value that represents how large a vector is.
Norms are widely used in:
- Machine Learning
- Data Science
- Optimization
- Computer Vision
- Numerical Computing
Common types of norms:
- L1 Norm (Manhattan Norm)
- L2 Norm (Euclidean Norm)
- Frobenius Norm (Matrix Norm)
Key Points
1. L1 Norm (Manhattan Norm)
The L1 norm calculates the sum of the absolute values of all vector elements.
Formula:
It is called the Manhattan norm because it measures distance like moving through city blocks.
Example
Given:
Find the L1 norm.
Solution:
Therefore:
2. L2 Norm (Euclidean Norm)
Definition
The L2 norm measures the shortest distance between a vector and the origin.
It is the normal length of a vector in geometry.
Formula:
The L2 norm is the most commonly used norm in mathematics and machine learning.
Example
Given:
Calculate the L2 norm.
Solution:
Therefore:
Frobenius Norm
Definition
The Frobenius norm is the extension of the L2 norm from vectors to matrices.
It measures the magnitude of a matrix by treating all matrix elements as vector elements.
Formula:
In simple words:
- Square every element of the matrix.
- Add all squared values.
- Take the square root.
Key Points
For a vector:
The L2 norm is:
For a matrix:
The Frobenius norm is:
The Frobenius norm is basically the matrix version of the L2 norm.
Example / Code
Given:
Find the Frobenius norm.
Solution:
Explanation
The Frobenius norm gives a measurement of the total magnitude of a matrix.
A larger Frobenius norm means:
- Larger matrix values
- Greater matrix magnitude
A smaller Frobenius norm means:
- Smaller values
- Less magnitude
Applications:
- Measuring error between matrices
- Machine learning optimization
- Matrix approximation
- Image processing
Output
For:
The Frobenius norm is:
Determinants
Definition
The determinant is a scalar value calculated from a square matrix.
The determinant provides important information about:
- Matrix invertibility
- Linear independence
- Solutions of linear systems
The determinant is represented as:
Key Points
Properties of Determinants
If:
then:
- The matrix is singular.
- The inverse of the matrix does not exist.
- The system does not have a unique solution.
- The columns of the matrix are linearly dependent.
If:
then:
- The matrix is invertible.
- The inverse exists.
- The columns are linearly independent.
- The system has a unique solution.
Determinant of a 2×2 Matrix
For:
The determinant is:
Example
Given:
Calculate the determinant.
Solution:
Therefore:
Determinant of a 3×3 Matrix
For:
The determinant is calculated using expansion:
Example
Find the determinant:
Using expansion:
First minor:
Second minor:
Third minor:
Therefore:
Common Mistakes
- Using determinants for non-square matrices.
- Forgetting the negative sign in the second term of a 3×3 determinant.
- Confusing determinant with absolute value.
- Forgetting that zero determinant means no inverse exists.
- Mixing L1 and L2 norm formulas.
- Forgetting to square values before adding in Frobenius norm.
Short Exam Notes
- Norm measures the magnitude of vectors or matrices.
- L1 norm:
- L2 norm:
- Frobenius norm is the matrix version of L2 norm.
- Determinant is defined only for square matrices.
- If:
the matrix is singular.
- If:
the matrix is invertible.
- Determinants are used later for finding eigenvalues.
Eigenvalues and Eigenvectors Concepts
Part 2: Eigenvalues and Eigenvectors Concepts
Definition
Eigenvalues and eigenvectors are special concepts in linear algebra that describe how a matrix transforms vectors.
When a matrix multiplies a vector, the vector usually changes both its direction and magnitude.
However, there are some special vectors that maintain their direction after transformation. These vectors are called eigenvectors.
The value that describes how much the eigenvector is scaled is called the eigenvalue.
The relationship between a matrix, eigenvector, and eigenvalue is:
Where:
- (A) = square matrix
- (v) = eigenvector
- (\lambda) = eigenvalue
- (Av) = transformed vector
Key Points
1. Understanding Eigenvectors
An eigenvector is a non-zero vector that does not change its direction when multiplied by a matrix.
The matrix only changes the size of the vector.
Mathematically:
means:
- The output of the matrix multiplication is still the same vector direction.
- The vector is only multiplied by a scalar value.
- That scalar value is the eigenvalue.
Example / Code
Given matrix:
Consider the vector:
Multiply matrix (A) by vector (v):
Calculate each element:
Rewrite the result:
Therefore:
The vector:
is an eigenvector.
The eigenvalue is:
Explanation
Normally, matrix transformations can:
- Rotate vectors
- Stretch vectors
- Shrink vectors
- Change directions
Example:
A normal vector:
after transformation:
may point in a completely different direction.
But an eigenvector behaves differently:
The direction remains unchanged.
Only the magnitude changes.
2. Understanding Eigenvalues
Definition
An eigenvalue is a scalar value that represents the scaling factor of an eigenvector.
It tells us how much the vector grows, shrinks, or changes direction.
Effect of Eigenvalues
Positive Eigenvalue
If:
The vector keeps the same direction.
Example:
The vector becomes twice as large.
Eigenvalue Between 0 and 1
If:
The vector becomes smaller.
Example:
The vector becomes half its original size.
Negative Eigenvalue
If:
The vector reverses its direction.
Example:
The vector points in the opposite direction.
Zero Eigenvalue
If:
Then:
The vector is transformed into the zero vector.
3. Matrix Transformation Perspective
Definition
Previously, matrices were studied from the vector perspective.
The expression:
means:
A matrix transforms a vector.
Now we study matrices from another perspective:
Given a matrix, what special vectors and numbers belong to it?
These special values are:
- Special vectors → Eigenvectors
- Special numbers → Eigenvalues
Examples of Matrix Transformations
Zero Transformation
A zero matrix transforms every vector into the zero vector.
Identity Transformation
The identity matrix is:
Multiplying by the identity matrix does not change the vector:
Scaling Transformation
If:
Then:
The vector becomes twice its size.
Rotation Transformation
A rotation matrix can change the direction of vectors.
A rotation of (180^\circ) gives:
The vector points in the opposite direction.
4. Importance of Eigenvalues and Eigenvectors
Eigenvalues and eigenvectors are important in many fields:
Machine Learning
Used for:
- Principal Component Analysis (PCA)
- Feature extraction
- Dimensionality reduction
Data Science
Used for:
- Finding important patterns
- Reducing large datasets
- Data compression
Computer Vision
Used for:
- Image processing
- Object recognition
- Feature detection
Engineering and Physics
Used for:
- Stability analysis
- Signal processing
- System modeling
Eigenvalues and Data Compression
Definition
Eigenvalues help identify which eigenvectors contain the most important information in data.
Suppose a dataset has 100 dimensions.
After finding eigenvalues:
The eigenvalues show the contribution of each eigenvector.
Explanation
Large eigenvalues:
- Represent important information.
- Contribute more to the dataset.
- Should usually be kept.
Small eigenvalues:
- Represent less important information.
- Contribute very little.
- Can often be removed.
This idea is used in dimensionality reduction.
Example 2: Another Eigenvector
Given:
Consider:
Calculate:
First row:
Second row:
Therefore:
This means:
Therefore:
and:
is an eigenvector.
Common Mistakes
- Thinking every vector is an eigenvector.
- Forgetting that eigenvectors must be non-zero vectors.
- Confusing eigenvalues with eigenvectors.
- Thinking eigenvalues are vectors.
- Forgetting that eigenvalues are scalar values.
- Assuming eigenvectors always keep the same length.
- Ignoring negative eigenvalues and direction reversal.
Short Exam Notes (Very Concise Revision)
- Eigenvectors are special vectors whose direction does not change after transformation.
- Eigenvalues are scaling factors of eigenvectors.
- The main equation is:
- Eigenvectors must be non-zero.
- Eigenvalues can be positive, negative, or zero.
- Large eigenvalues represent important data directions.
- Eigenvalues and eigenvectors are used in PCA and compression.
- The eigenvector equation is:
- Eigenvalues are found first, then eigenvectors.
Finding Eigenvalues Using Characteristic Equation
Part 3: Finding Eigenvalues (Characteristic Equation)
Definition
The first step in finding eigenvalues is to solve the characteristic equation.
For a square matrix (A), eigenvalues are values of (\lambda) that satisfy:
To find the eigenvalues, we rearrange this equation:
Because:
we can write:
Taking (v) as a common factor:
For this equation to have a non-zero solution:
This equation is called the characteristic equation or characteristic polynomial.
The solutions of this equation are the eigenvalues of matrix (A).
Key Points
1. Relationship Between Eigenvalues and Determinant
The characteristic equation is:
Where:
- (A) = original matrix
- (I) = identity matrix
- (\lambda) = eigenvalue
The determinant creates a polynomial equation.
The roots of this polynomial are the eigenvalues.
2. Identity Matrix
The identity matrix is used because:
For a 2×2 matrix:
Multiplying by identity does not change the vector.
Therefore:
3. Characteristic Equation for a 2×2 Matrix
Given:
First calculate:
Therefore:
Now calculate the determinant:
Using the determinant formula:
This equation is the characteristic polynomial.
Example / Code
Example 1: Finding Eigenvalues of a 2×2 Matrix
Given:
Step 1: Create (A-\lambda I)
The identity matrix is:
Therefore:
Step 2: Calculate Determinant
Using:
we get:
Expand:
Simplify:
Factor:
Step 3: Find Eigenvalues
Set each factor equal to zero:
and:
Therefore:
Explanation
The characteristic equation converts the eigenvalue problem into a normal polynomial equation.
The process is:
- Start with:
- Move all terms to one side:
- Remove the vector by taking determinant:
-
Solve the polynomial equation.
-
The solutions are eigenvalues.
Example 2: Matrix With Different Values
Given:
Find eigenvalues.
Step 1: Calculate (A-\lambda I)
Step 2: Characteristic Equation
Using determinant formula:
Expand:
Simplify:
Factor:
Therefore:
Finding Eigenvalues of 3×3 Matrices
For a 3×3 matrix:
We calculate:
The result is usually a cubic polynomial:
The roots of this polynomial are the eigenvalues.
Example: Upper Triangular Matrix
Given:
For triangular matrices:
The eigenvalues are the diagonal elements.
Therefore:
No determinant expansion is needed.
Important Properties
1. Number of Eigenvalues
An (n \times n) matrix has:
eigenvalues counting repeated values.
Example:
A 3×3 matrix has three eigenvalues.
2. Repeated Eigenvalues
Sometimes the same eigenvalue appears multiple times.
Example:
Eigenvalues:
3. Triangular Matrix Property
For upper or lower triangular matrices:
The eigenvalues are simply the diagonal elements.
Example:
Eigenvalues:
Common Mistakes
- Forgetting to subtract (\lambda I) from matrix (A).
- Using the wrong identity matrix size.
- Forgetting to set determinant equal to zero.
- Making mistakes while expanding the polynomial.
- Confusing eigenvalues with eigenvectors.
- Forgetting that eigenvalues come from solving the characteristic equation.
Short Exam Notes (Very Concise Revision)
- Eigenvalues are found from:
- (I) is the identity matrix.
- The result is called the characteristic polynomial.
- The roots of the polynomial are eigenvalues.
- For a 2×2 matrix:
- Triangular matrix eigenvalues are diagonal elements.
- After finding eigenvalues, find eigenvectors using:
Finding Eigenvectors with Examples
Part 4: Finding Eigenvectors
Definition
After finding the eigenvalues of a matrix, the next step is to find the corresponding eigenvectors.
The eigenvectors are found by solving:
Where:
- (A) = original matrix
- (\lambda) = eigenvalue
- (I) = identity matrix
- (v) = eigenvector
The equation:
is a homogeneous system of equations.
The solution vectors of this system are the eigenvectors.
Key Points
Steps for Finding Eigenvectors
To find eigenvectors:
Step 1: Find eigenvalues
First solve:
This gives the eigenvalues.
Step 2: Substitute each eigenvalue
For every eigenvalue, solve:
Step 3: Find the null space
The solution space of:
is the eigenspace.
Any non-zero vector in this space is an eigenvector.
Example 1: Finding Eigenvectors of a 2×2 Matrix
Given:
From Part 3, we already found the eigenvalues:
and
Now find the eigenvectors.
Finding Eigenvector for (\lambda=1)
Step 1: Calculate (A-\lambda I)
Therefore:
Step 2: Solve the System
Let:
Then:
This gives:
Therefore:
Let:
Then:
Therefore:
The eigenvector corresponding to:
is:
Finding Eigenvector for (\lambda=3)
Step 1: Calculate (A-3I)
Therefore:
Step 2: Solve
From the first equation:
Therefore:
Let:
Then:
The eigenvector is:
Final Answer
Eigenvalues:
Corresponding eigenvectors:
For:
For:
Explanation
The eigenvalue tells us the scaling amount.
The eigenvector tells us the direction that remains unchanged.
For:
the vector:
becomes three times larger.
For:
the vector:
does not change length or direction.
Example 2: Finding Eigenvectors of a 2×2 Matrix
Given:
From the characteristic equation:
we get:
Eigenvalues:
Eigenvector for (\lambda=5)
Calculate:
Solve:
Equation:
Therefore:
Let:
Then:
Eigenvector:
Eigenvector for (\lambda=2)
Calculate:
Solve:
Therefore:
Let:
Then:
Eigenvector:
Final Answer
Eigenvalues:
Eigenvectors:
For:
For:
Eigenvectors of 3×3 Matrices
For a 3×3 matrix:
The same process is used:
- Find eigenvalues:
- For each eigenvalue solve:
- The solution vectors are eigenvectors.
Example 3: 3×3 Matrix
Given:
Eigenvalues are diagonal values:
For (\lambda=4)
Calculate:
The equations are:
The variable (x) is free.
Let:
Eigenvector:
For (\lambda=2)
Calculate:
Equations:
Therefore:
Let:
Eigenvector:
Common Mistakes
- Finding eigenvectors before eigenvalues.
- Forgetting to solve:
- Choosing the zero vector as an eigenvector.
- Forgetting that multiple eigenvectors can exist for one eigenvalue.
- Making calculation errors during row reduction.
- Not simplifying eigenvectors.
Short Exam Notes (Very Concise Revision)
- Eigenvectors are found after eigenvalues.
- Use:
- Eigenvectors are the null space of:
-
Steps:
- Find eigenvalues.
- Substitute each eigenvalue.
- Solve the homogeneous system.
- Obtain non-zero solution vectors.
-
Eigenvectors are not unique; any scalar multiple is also an eigenvector.
Example:
If:
then:
is also an eigenvector.
Special Cases, Practice Questions, and Exam Revision Notes
Part 5: Special Cases + Practice Questions + Exam Revision Notes
Definition
Eigenvalues and eigenvectors have several special cases that help simplify calculations and understand matrix behavior.
Some matrices have special structures where eigenvalues or eigenvectors can be found more easily.
Important special cases include:
- Upper triangular matrices
- Lower triangular matrices
- Identity matrices
- Repeated eigenvalues
- Zero eigenvalues
- Symmetric matrices
Key Points
1. Eigenvalues of Triangular Matrices
Definition
A triangular matrix is a matrix where all elements below or above the main diagonal are zero.
There are two types:
Upper triangular matrix
Example:
Lower triangular matrix
Example:
Important Rule
For any triangular matrix:
Example:
The eigenvalues are:
No determinant expansion is required.
Explanation
The characteristic equation of a triangular matrix becomes:
Because the matrix is triangular:
is simply the product of diagonal elements:
Therefore, the eigenvalues are the diagonal values.
2. Identity Matrix Eigenvalues
Definition
The identity matrix is:
For any vector:
Comparing with:
We get:
Example
For:
All eigenvalues are:
Every non-zero vector is an eigenvector.
3. Zero Eigenvalue
Definition
If:
then:
This means the matrix transforms an eigenvector into the zero vector.
Important Property
A matrix has a zero eigenvalue if:
This means:
- Matrix is singular.
- Inverse does not exist.
- Columns are linearly dependent.
Example
Given:
Calculate determinant:
Therefore:
is one of the eigenvalues.
4. Repeated Eigenvalues
Definition
Sometimes the same eigenvalue appears more than once in the characteristic polynomial.
Example:
Eigenvalues:
Important Note
A repeated eigenvalue does not always have multiple independent eigenvectors.
There are two possibilities:
Case 1: Enough eigenvectors exist
The matrix can be diagonalized.
Case 2: Not enough eigenvectors exist
The matrix cannot be diagonalized.
5. Symmetric Matrix Property
Definition
A matrix is symmetric if:
Example:
The matrix is symmetric because:
Important Properties of Symmetric Matrices
For symmetric matrices:
- All eigenvalues are real.
- Eigenvectors are orthogonal.
- They can be diagonalized easily.
These properties are very important in machine learning.
Practice Questions
Question 1
Find the eigenvalues of:
Solution
The matrix is lower triangular.
Eigenvalues are the diagonal elements:
Final answer:
Question 2
Find eigenvalues of:
Solution
The matrix is upper triangular.
Therefore:
Final answer:
Question 3
Find eigenvalues and eigenvectors of:
Step 1: Find Eigenvalues
The matrix is lower triangular.
Therefore:
Step 2: Find Eigenvectors
For each eigenvalue solve:
The process:
For:
solve:
For:
solve:
For:
solve:
Question 4
Find eigenvalues of:
Given:
Find corresponding eigenvectors using:
Question 5
Find eigenvalues and eigenvectors:
Given eigenvalues:
Find eigenvectors for each eigenvalue.
Complete Eigenvalue and Eigenvector Algorithm
Step 1: Check Matrix Type
Ask:
- Is it triangular?
- Is it symmetric?
- Is it identity?
Special structures may simplify the solution.
Step 2: Find Eigenvalues
Use:
Solve the characteristic polynomial.
Step 3: Find Eigenvectors
For every eigenvalue:
Find the null space.
Step 4: Verify
Check:
If both sides are equal, the eigenvector is correct.
Common Mistakes
- Forgetting that eigenvalues come from:
- Using the wrong identity matrix size.
- Finding eigenvectors before eigenvalues.
- Accepting the zero vector as an eigenvector.
- Forgetting repeated eigenvalues.
- Assuming repeated eigenvalues always have multiple eigenvectors.
- Forgetting triangular matrices use diagonal elements.
- Not checking the final answer using:
Short Exam Notes (Very Concise Revision)
Norms
- L1 norm:
- L2 norm:
- Frobenius norm:
Determinant
- Only defined for square matrices.
- If:
matrix is singular.
- If:
matrix is invertible.
Eigenvalues
Found using:
Eigenvectors
Found using:
Important Properties
- Triangular matrix → eigenvalues are diagonal elements.
- Identity matrix → eigenvalue is 1.
- Zero determinant → zero eigenvalue exists.
- Symmetric matrix → real eigenvalues and orthogonal eigenvectors.
- Eigenvectors are not unique; any scalar multiple is also valid.
Final Exam Revision Summary
The complete process:
- Given matrix (A).
- Find:
- Solve for eigenvalues.
- For each eigenvalue solve:
- Obtain eigenvectors.
- Verify:
Eigenvalues tell how much a direction changes.
Eigenvectors tell which directions remain unchanged.
Together, eigenvalues and eigenvectors describe the fundamental behavior of a matrix transformation.