Guozhen AIGlobal AI field notes and model intelligence

English translation

Define matrix A

Published:

Category: Linear Algebra for AI

Read time: 4 min

Reads: 0

Lesson #17Views are counted together with the original Chinese articleImages are preserved from the source page

Conceptual Diagram of Eigen Decomposition

Eigen decomposition breaks down a complex matrix into two intuitive components: direction (encoded in eigenvectors) and scaling (encoded in eigenvalues). When applicable, many matrix operations become significantly more transparent.

Eigen Decomposition Verification Diagram

We’ll first verify whether a given matrix is diagonalizable. Not all matrices admit a full eigen decomposition.

In the previous article, we introduced the fundamental definitions of eigenvalues and eigenvectors. This article delves deeper into eigen decomposition—a powerful technique that expresses a matrix as a product of its intrinsic building blocks: eigenvectors and eigenvalues.

Review: Eigenvalues and Eigenvectors

Let’s begin by recalling several core concepts. For a square matrix ( A ), an eigenvalue ( \lambda ) and its corresponding eigenvector ( \mathbf{v} ) satisfy:

Av=λvA \mathbf{v} = \lambda \mathbf{v}

Here, applying ( A ) to ( \mathbf{v} ) results purely in scaling—no rotation or shearing—by the scalar factor ( \lambda ).

What Is Eigen Decomposition?

Eigen decomposition expresses a square matrix ( A ) as a product involving its eigenvectors and eigenvalues. Specifically, if ( A ) has ( n ) linearly independent eigenvectors, it can be written as:

A=VΛV1A = V \Lambda V^{-1}

where

  • ( V ) is the matrix whose columns are the eigenvectors of ( A ), and
  • ( \Lambda ) is a diagonal matrix whose entries are the corresponding eigenvalues of ( A ).

This representation is called the eigen decomposition of ( A ).

Conditions for Eigen Decomposition

Eigen decomposition is only possible when ( A ) is diagonalizable. A necessary and sufficient condition is that ( A ) possesses ( n ) linearly independent eigenvectors (i.e., a full basis of eigenvectors in ( \mathbb{R}^n )).

Step-by-Step Eigen Decomposition

Let’s walk through eigen decomposition using a concrete example. Consider the matrix:

A=(4123)A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}

Step 1: Compute the Eigenvalues

Eigenvalues are found by solving the characteristic equation:

det(AλI)=0\det(A - \lambda I) = 0

where ( I ) is the identity matrix. Compute:

AλI=(4λ123λ)A - \lambda I = \begin{pmatrix} 4 - \lambda & 1 \\ 2 & 3 - \lambda \end{pmatrix}

Its determinant is:

det(AλI)=(4λ)(3λ)21=λ27λ+10\det(A - \lambda I) = (4 - \lambda)(3 - \lambda) - 2 \cdot 1 = \lambda^2 - 7\lambda + 10

Solve the quadratic:

λ27λ+10=0\lambda^2 - 7\lambda + 10 = 0

Using the quadratic formula yields:

λ1=5,λ2=2\lambda_1 = 5, \quad \lambda_2 = 2

Step 2: Compute the Eigenvectors

For each eigenvalue ( \lambda_i ), solve the homogeneous system ( (A - \lambda_i I)\mathbf{v} = \mathbf{0} ).

  1. For ( \lambda_1 = 5 ):
A5I=(1122)A - 5I = \begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix}

The row-reduced system gives:

x+y=0y=x- x + y = 0 \quad \Rightarrow \quad y = x

So one eigenvector is:

v1=k(11),k0\mathbf{v}_1 = k \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \quad k \neq 0
  1. For ( \lambda_2 = 2 ):
A2I=(2121)A - 2I = \begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix}

The system reduces to:

2x+y=0y=2x2x + y = 0 \quad \Rightarrow \quad y = -2x

So a corresponding eigenvector is:

v2=k(12),k0\mathbf{v}_2 = k \begin{pmatrix} 1 \\ -2 \end{pmatrix}, \quad k \neq 0

Step 3: Assemble the Eigen Decomposition

We now have:

Eigen Decomposition Decision Card

When interpreting eigen decomposition, first assess: Is the matrix diagonalizable? Are eigenvalues distinct (or at least sufficiently many)? Are eigenvectors linearly independent? And finally—does the reconstructed product match the original matrix?

  • Eigenvalues: ( \lambda_1 = 5 ), ( \lambda_2 = 2 )
  • Eigenvectors (choosing ( k = 1 )):
v1=(11),v2=(12)\mathbf{v}_1 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}, \quad \mathbf{v}_2 = \begin{pmatrix} 1 \\ -2 \end{pmatrix}

Construct:

V=(1112),Λ=(5002)V = \begin{pmatrix} 1 & 1 \\ 1 & -2 \end{pmatrix}, \quad \Lambda = \begin{pmatrix} 5 & 0 \\ 0 & 2 \end{pmatrix}

You can verify that ( A = V \Lambda V^{-1} ) holds.

Code Example

Using Python and NumPy, eigen decomposition is straightforward:

Linear Algebra Reading Roadmap Card

Before reading “Eigen Decomposition of Eigenvalues and Eigenvectors”, preview the visual path from problem → computation → result shown above. After reading, revisit this diagram to confirm you can reproduce each step.

import numpy as np

# Define matrix A
A = np.array([[4, 1],
              [2, 3]])

# Compute eigenvalues and eigenvectors
eigenvalues, eigenvectors = np.linalg.eig(A)

print("Eigenvalues:", eigenvalues)
print("Eigenvectors:\n", eigenvectors)

# Reconstruct A
V = eigenvectors
Lambda = np.diag(eigenvalues)
A_reconstructed = V @ Lambda @ np.linalg.inv(V)

print("Reconstructed A:\n", A_reconstructed)

Running this code yields a matrix numerically identical to the original ( A ), confirming correctness of the decomposition.

Eigen Decomposition Application Recap Card

When reviewing “Eigen Decomposition of Eigenvalues and Eigenvectors”, consolidate key concepts, procedural steps, and observable outcomes on a single page for efficient revision.

Eigen Decomposition Application Checklist Card

When practicing “Eigen Decomposition of Eigenvalues and Eigenvectors”, explicitly list input conditions, computational actions, and expected outputs side-by-side—this supports accurate self-checking and future review.

Summary

Eigen decomposition is a foundational tool in linear algebra, widely used in machine learning and data analysis. It reveals how a matrix acts geometrically—by stretching space along specific directions (eigenvectors), scaled by corresponding magnitudes (eigenvalues). This insight is essential for understanding data structure, performing dimensionality reduction (e.g., Principal Component Analysis), and solving systems of differential equations.

In the next article, we’ll explore inner products and orthogonality, focusing on the definition, properties, and geometric interpretation of inner products. Stay tuned!

Continue

Keep reading from here

Browse English site

Reader Messages

Reader messages

Questions, corrections, extra sources, or hands-on results can be left here. No login is required.

Max 800 characters

To reduce spam, each message is checked for length, link count, and posting frequency.

0/800

Messages

0 messages
Loading messages...