```html

Algebraic Operations on Matrices

Matrices are fundamental in various fields of physics and engineering, serving as powerful tools for representing and manipulating systems of linear equations. Understanding the algebraic operations on matrices is the first step towards harnessing their potential.

Addition and Subtraction of Matrices

Matrix addition and subtraction are performed element-wise. For these operations to be valid, the matrices involved must have the same dimensions (i.e., the same number of rows and columns).

Let A and B be two matrices of the same dimension m x n. Their sum, C = A + B, is an m x n matrix where each element cij is the sum of the corresponding elements aij and bij from matrices A and B.

Similarly, their difference, D = A - B, is an m x n matrix where each element dij is the difference of the corresponding elements aij and bij.

Example:

If $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$ and $B = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}$, then

$A + B = \begin{pmatrix} 1+5 & 2+6 \\ 3+7 & 4+8 \end{pmatrix} = \begin{pmatrix} 6 & 8 \\ 10 & 12 \end{pmatrix}$

$A - B = \begin{pmatrix} 1-5 & 2-6 \\ 3-7 & 4-8 \end{pmatrix} = \begin{pmatrix} -4 & -4 \\ -4 & -4 \end{pmatrix}$

Scalar Multiplication

Scalar multiplication involves multiplying every element of a matrix by a single number (a scalar). If k is a scalar and A is an m x n matrix, then the scalar multiple kA is an m x n matrix where each element is k times the corresponding element of A.

Example:

If $k = 3$ and $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$, then

$kA = 3 \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} = \begin{pmatrix} 3 \times 1 & 3 \times 2 \\ 3 \times 3 & 3 \times 4 \end{pmatrix} = \begin{pmatrix} 3 & 6 \\ 9 & 12 \end{pmatrix}$

Matrix Multiplication

Matrix multiplication is a more complex operation. For the product AB to be defined, the number of columns in matrix A must be equal to the number of rows in matrix B. If A is an m x n matrix and B is an n x p matrix, their product C = AB is an m x p matrix.

The element cij of the product matrix C is calculated by taking the dot product of the i-th row of A and the j-th column of B. That is, $c_{ij} = \sum_{k=1}^{n} a_{ik}b_{kj}$.

Important Note: Matrix multiplication is generally not commutative, meaning AB is usually not equal to BA.

Example:

Let $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$ (2x2) and $B = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}$ (2x2).

$AB = \begin{pmatrix} (1 \times 5 + 2 \times 7) & (1 \times 6 + 2 \times 8) \\ (3 \times 5 + 4 \times 7) & (3 \times 6 + 4 \times 8) \end{pmatrix} = \begin{pmatrix} (5 + 14) & (6 + 16) \\ (15 + 28) & (18 + 32) \end{pmatrix} = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}$

Now let's compute BA:

$BA = \begin{pmatrix} (5 \times 1 + 6 \times 3) & (5 \times 2 + 6 \times 4) \\ (7 \times 1 + 8 \times 3) & (7 \times 2 + 8 \times 4) \end{pmatrix} = \begin{pmatrix} (5 + 18) & (10 + 24) \\ (7 + 24) & (14 + 32) \end{pmatrix} = \begin{pmatrix} 23 & 34 \\ 31 & 46 \end{pmatrix}$

As you can see, $AB \neq BA$.

Transpose of a Matrix

The transpose of a matrix A, denoted as AT or A', is obtained by interchanging its rows and columns. If A is an m x n matrix, then AT is an n x m matrix.

The element in the i-th row and j-th column of AT is the element in the j-th row and i-th column of A (i.e., $(A^T)_{ij} = a_{ji}$).

Example:

If $A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}$ (2x3), then

$A^T = \begin{pmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{pmatrix}$ (3x2)

Determinant of a Matrix

The determinant is a scalar value that can be computed from the elements of a square matrix. It provides crucial information about the matrix, such as whether it is invertible. The determinant is denoted as det(A) or |A|.

For a 2x2 matrix $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$, the determinant is $|A| = ad - bc$.

For a 3x3 matrix $A = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}$, the determinant can be calculated using cofactor expansion:

$|A| = a \begin{vmatrix} e & f \\ h & i \end{vmatrix} - b \begin{vmatrix} d & f \\ g & i \end{vmatrix} + c \begin{vmatrix} d & e \\ g & h \end{vmatrix}$

$|A| = a(ei - fh) - b(di - fg) + c(dh - eg)$

Example:

For $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$, $|A| = (1 \times 4) - (2 \times 3) = 4 - 6 = -2$.

For $A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}$,

$|A| = 1 \begin{vmatrix} 1 & 4 \\ 6 & 0 \end{vmatrix} - 2 \begin{vmatrix} 0 & 4 \\ 5 & 0 \end{vmatrix} + 3 \begin{vmatrix} 0 & 1 \\ 5 & 6 \end{vmatrix}$

$|A| = 1((1 \times 0) - (4 \times 6)) - 2((0 \times 0) - (4 \times 5)) + 3((0 \times 6) - (1 \times 5))$

$|A| = 1(0 - 24) - 2(0 - 20) + 3(0 - 5)$

$|A| = -24 - 2(-20) + 3(-5) = -24 + 40 - 15 = 1$.

Inverse of a Matrix

The inverse of a square matrix A, denoted as A-1, is a matrix such that when multiplied by A, it yields the identity matrix I (a square matrix with ones on the main diagonal and zeros elsewhere). That is, AA-1 = A-1A = I.

A matrix has an inverse if and only if its determinant is non-zero. Such a matrix is called non-singular or invertible.

For a 2x2 matrix $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$, the inverse is given by $A^{-1} = \frac{1}{|A|} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix}$.

For larger matrices, the inverse can be found using methods like Gauss-Jordan elimination or by using the adjugate matrix: $A^{-1} = \frac{1}{|A|} \text{adj}(A)$, where adj(A) is the transpose of the cofactor matrix of A.

Example:

For $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$, we found $|A| = -2$.

$A^{-1} = \frac{1}{-2} \begin{pmatrix} 4 & -2 \\ -3 & 1 \end{pmatrix} = \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix}$.

Let's check: $AA^{-1} = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix} = \begin{pmatrix} (1 \times -2 + 2 \times 1.5) & (1 \times 1 + 2 \times -0.5) \\ (3 \times -2 + 4 \times 1.5) & (3 \times 1 + 4 \times -0.5) \end{pmatrix} = \begin{pmatrix} (-2 + 3) & (1 - 1) \\ (-6 + 6) & (3 - 2) \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I$.

Trace of a Matrix

The trace of a square matrix is the sum of the elements on its main diagonal. It is denoted as tr(A).

For a matrix $A = \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \dots & a_{nn} \end{pmatrix}$, tr(A) = $\sum_{i=1}^{n} a_{ii}$.

Properties of Trace:

  • tr(A + B) = tr(A) + tr(B)
  • tr(kA) = k tr(A)
  • tr(AB) = tr(BA)

Example:

If $A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}$, then tr(A) = 1 + 5 + 9 = 15.

``` ```html

Rank of a Matrix

The rank of a matrix is a fundamental concept that describes the dimensionality of the vector space spanned by its columns or rows. It essentially tells us the maximum number of linearly independent rows or columns in the matrix.

There are several equivalent definitions and methods to determine the rank of a matrix.

Definition using Linear Independence

The rank of a matrix A, denoted as rank(A), is the maximum number of linearly independent row vectors or column vectors of A.

Linear Independence: A set of vectors {$v_1, v_2, \dots, v_k$} is linearly independent if the only solution to the equation $c_1v_1 + c_2v_2 + \dots + c_kv_k = 0$ (where 0 is the zero vector) is $c_1 = c_2 = \dots = c_k = 0$. If there are non-zero coefficients that satisfy the equation, the vectors are linearly dependent.

Definition using Row Echelon Form

A more practical way to find the rank is by transforming the matrix into its row echelon form (or reduced row echelon form) using elementary row operations. The rank of the matrix is then equal to the number of non-zero rows in its row echelon form.

Elementary Row Operations:

  • Swapping two rows.
  • Multiplying a row by a non-zero scalar.
  • Adding a multiple of one row to another row.

Row Echelon Form: A matrix is in row echelon form if:

  • All non-zero rows are above any rows of all zeros.
  • The leading coefficient (the first non-zero number from the left, also called a pivot) of a non-zero row is always strictly to the right of the leading coefficient of the row above it.
  • All entries in a column below a leading coefficient are zeros.

Example:

Let's find the rank of the matrix $A = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 3 & 6 & 9 \end{pmatrix}$.

We use elementary row operations:

1. Replace R2 with R2 - 2*R1:

$\begin{pmatrix} 1 & 2 & 3 \\ 2 - 2(1) & 4 - 2(2) & 6 - 2(3) \\ 3 & 6 & 9 \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 3 & 6 & 9 \end{pmatrix}$

2. Replace R3 with R3 - 3*R1:

$\begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 3 - 3(1) & 6 - 3(2) & 9 - 3(3) \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}$

The resulting matrix is in row echelon form. It has one non-zero row. Therefore, the rank of matrix A is 1.

Definition using Determinants

The rank of a matrix A is the largest integer r such that there exists at least one r x r submatrix of A whose determinant is non-zero.

A submatrix is obtained by deleting any number of rows and columns from the original matrix.

Example:

Consider the matrix $A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}$.

First, check the determinant of the matrix itself (a 3x3 submatrix):

$|A| = 1$. Since the determinant is non-zero, the rank is at least 3. As it's a 3x3 matrix, the maximum possible rank is 3. Thus, rank(A) = 3.

Let's consider another matrix $B = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 3 & 6 & 3 \end{pmatrix}$.

Check the determinant of B (3x3):

$|B| = 1(4 \times 3 - 2 \times 6) - 2(2 \times 3 - 2 \times 3) + 1(2 \times 6 - 4 \times 3)$

$|B| = 1(12 - 12) - 2(6 - 6) + 1(12 - 12) = 0$. So, the rank is less than 3.

Now, check for 2x2 submatrices. Let's take the top-left 2x2 submatrix: $\begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix}$. Its determinant is $(1 \times 4) - (2 \times 2) = 4 - 4 = 0$.

Let's take another 2x2 submatrix: $\begin{pmatrix} 1 & 1 \\ 2 & 2 \end{pmatrix}$. Its determinant is $(1 \times 2) - (1 \times 2) = 0$.

Let's take another 2x2 submatrix: $\begin{pmatrix} 2 & 1 \\ 4 & 2 \end{pmatrix}$. Its determinant is $(2 \times 2) - (1 \times 4) = 4 - 4 = 0$.

In fact, all 2x2 submatrices formed by the first two columns or the first and third columns, or the second and third columns, will have a determinant of 0 because the second and third columns are just multiples of the first column.

For example, the submatrix formed by rows 1, 2 and columns 1, 3 is $\begin{pmatrix} 1 & 1 \\ 2 & 2 \end{pmatrix}$, determinant is $1 \times 2 - 1 \times 2 = 0$.

Consider the submatrix formed by rows 1, 3 and columns 1, 2: $\begin{pmatrix} 1 & 2 \\ 3 & 6 \end{pmatrix}$, determinant is $1 \times 6 - 2 \times 3 = 0$.

Since all 2x2 submatrices have a determinant of 0, the rank must be less than 2.

Now, check for 1x1 submatrices. The matrix contains non-zero elements, e.g., the element '1' at position (1,1). The determinant of this 1x1 submatrix is 1, which is non-zero.

Therefore, the largest integer r for which there exists an r x r submatrix with a non-zero determinant is r=1. So, rank(B) = 1.

Properties of Rank

  • rank(A) = rank(AT)
  • rank(AB) ≤ min(rank(A), rank(B))
  • rank(A + B) ≤ rank(A) + rank(B)
  • If A is an m x n matrix, then 0 ≤ rank(A) ≤ min(m, n).
  • rank(A) = n if and only if A is an invertible n x n matrix.
Shortcut for Rank: For a square n x n matrix, if its determinant is non-zero, its rank is n. If the determinant is zero, its rank is less than n. Use row reduction to find the exact rank by counting the non-zero rows.
``` ```html

Eigenvalues and Eigenvectors

Eigenvalues and eigenvectors are fundamental concepts in linear algebra and have widespread applications in physics, particularly in quantum mechanics, vibration analysis, and stability analysis. They represent special directions and scaling factors associated with a linear transformation represented by a matrix.

Definition

Let A be a square n x n matrix. A non-zero vector $v$ is called an eigenvector of A if there exists a scalar $\lambda$ such that:

$Av = \lambda v$

The scalar $\lambda$ is called the eigenvalue corresponding to the eigenvector $v$.

In simpler terms, when a matrix A acts on its eigenvector $v$, the result is simply a scaled version of the original vector $v$. The direction of $v$ remains unchanged (or is reversed if $\lambda$ is negative), and it is scaled by the factor $\lambda$.

Finding Eigenvalues

To find the eigenvalues, we rearrange the defining equation:

$Av = \lambda v$

$Av - \lambda v = 0$

$Av - \lambda Iv = 0$ (where I is the identity matrix of the same dimension as A)

$(A - \lambda I)v = 0$

For this equation to have a non-zero solution for $v$ (i.e., for $v$ to be an eigenvector), the matrix $(A - \lambda I)$ must be singular. A matrix is singular if and only if its determinant is zero.

Therefore, the eigenvalues $\lambda$ are the solutions to the characteristic equation:

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

Finding Eigenvectors

Once the eigenvalues ($\lambda$) are found, we can find the corresponding eigenvectors by substituting each eigenvalue back into the equation $(A - \lambda I)v = 0$ and solving for the vector $v$.

This typically involves solving a system of linear equations. The solution for $v$ will generally be a set of vectors lying along a particular direction, and any non-zero vector in that direction is a valid eigenvector.

Example: Finding Eigenvalues and Eigenvectors

Let $A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}$.

Step 1: Find the characteristic equation.**

We need to compute det(A - $\lambda$I):

$A - \lambda I = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} - \lambda \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 4-\lambda & 1 \\ 2 & 3-\lambda \end{pmatrix}$

det(A - $\lambda$I) = $(4-\lambda)(3-\lambda) - (1)(2)$

= $12 - 4\lambda - 3\lambda + \lambda^2 - 2$

= $\lambda^2 - 7\lambda + 10$

The characteristic equation is $\lambda^2 - 7\lambda + 10 = 0$.

Step 2: Solve the characteristic equation for eigenvalues.**

Factoring the quadratic equation:

$(\lambda - 2)(\lambda - 5) = 0$

The eigenvalues are $\lambda_1 = 2$ and $\lambda_2 = 5$.

Step 3: Find the eigenvectors for each eigenvalue.**

For $\lambda_1 = 2$:**

We solve $(A - 2I)v = 0$.

$A - 2I = \begin{pmatrix} 4-2 & 1 \\ 2 & 3-2 \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix}$

The system of equations is:

$2v_1 + v_2 = 0$

$2v_1 + v_2 = 0$

Both equations are identical, indicating linear dependence. From $2v_1 + v_2 = 0$, we get $v_2 = -2v_1$.

Let $v_1 = t$ (where t is any non-zero scalar). Then $v_2 = -2t$.

The eigenvectors for $\lambda_1 = 2$ are of the form $v = \begin{pmatrix} t \\ -2t \end{pmatrix} = t \begin{pmatrix} 1 \\ -2 \end{pmatrix}$.

A common choice is to pick $t=1$, so an eigenvector is $v_1 = \begin{pmatrix} 1 \\ -2 \end{pmatrix}$.

For $\lambda_2 = 5$:**

We solve $(A - 5I)v = 0$.

$A - 5I = \begin{pmatrix} 4-5 & 1 \\ 2 & 3-5 \end{pmatrix} = \begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix}$

The system of equations is:

$-v_1 + v_2 = 0 \implies v_2 = v_1$

$2v_1 - 2v_2 = 0 \implies v_1 = v_2$

Both equations are consistent. Let $v_1 = t$. Then $v_2 = t$.

The eigenvectors for $\lambda_2 = 5$ are of the form $v = \begin{pmatrix} t \\ t \end{pmatrix} = t \begin{pmatrix} 1 \\ 1 \end{pmatrix}$.

A common choice is to pick $t=1$, so an eigenvector is $v_2 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$.

So, for the matrix $A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}$, the eigenvalues are 2 and 5, with corresponding eigenvectors $\begin{pmatrix} 1 \\ -2 \end{pmatrix}$ and $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$ respectively (or any non-zero scalar multiples of these).

Properties of Eigenvalues and Eigenvectors

  • The sum of the eigenvalues of a matrix is equal to its trace: $\sum_{i=1}^{n} \lambda_i = \text{tr}(A)$.
  • The product of the eigenvalues of a matrix is equal to its determinant: $\prod_{i=1}^{n} \lambda_i = \det(A)$.
  • Eigenvectors corresponding to distinct eigenvalues of a symmetric or Hermitian matrix are orthogonal.
  • If A is an n x n matrix, it can have at most n distinct eigenvalues.
Mnemonic for Eigenvalues/Eigenvectors: Think of it as finding the "special directions" (eigenvectors) of a transformation (matrix A) where the transformation only stretches or shrinks along those directions (by the factor of eigenvalue $\lambda$). The characteristic equation det(A - $\lambda$I) = 0 is the key to unlocking the eigenvalues.
``` ```html

Characteristic Equation and Cayley–Hamilton Theorem

The Characteristic Equation

As discussed in the previous section, the characteristic equation of an n x n square matrix A is given by:

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

where $\lambda$ represents the eigenvalues and I is the n x n identity matrix.

Expanding this determinant results in a polynomial in $\lambda$ of degree n:

$p(\lambda) = c_n \lambda^n + c_{n-1} \lambda^{n-1} + \dots + c_1 \lambda + c_0 = 0$

The roots of this polynomial are the eigenvalues of the matrix A.

Example for a 3x3 matrix:

Let $A = \begin{pmatrix} 1 & 2 & 0 \\ 0 & 3 & 1 \\ 0 & 0 & 2 \end{pmatrix}$. This is an upper triangular matrix.

$A - \lambda I = \begin{pmatrix} 1-\lambda & 2 & 0 \\ 0 & 3-\lambda & 1 \\ 0 & 0 & 2-\lambda \end{pmatrix}$

The determinant of an upper (or lower) triangular matrix is the product of its diagonal elements.

det(A - $\lambda$I) = $(1-\lambda)(3-\lambda)(2-\lambda)$

The characteristic equation is $(1-\lambda)(3-\lambda)(2-\lambda) = 0$.

The eigenvalues are the roots: $\lambda_1 = 1$, $\lambda_2 = 3$, $\lambda_3 = 2$.

The Cayley–Hamilton Theorem

The Cayley–Hamilton theorem is a profound result in linear algebra that states that every square matrix satisfies its own characteristic equation. In other words, if $p(\lambda) = c_n \lambda^n + c_{n-1} \lambda^{n-1} + \dots + c_1 \lambda + c_0$ is the characteristic polynomial of an n x n matrix A, then:

$p(A) = c_n A^n + c_{n-1} A^{n-1} + \dots + c_1 A + c_0 I = 0$

where 0 is the n x n zero matrix.

Significance and Applications:

  • Calculating Matrix Powers: The theorem provides a method to express higher powers of a matrix (like An, An+1, etc.) as linear combinations of lower powers of A (from A0=I to An-1). This is extremely useful for simplifying calculations involving matrix powers.
  • Finding Matrix Inverse: If the constant term $c_0$ (which is $(-1)^n \det(A)$) is non-zero, meaning the matrix is invertible, we can rearrange the characteristic equation $p(A) = 0$ to solve for A-1.
  • Theoretical Importance: It establishes a fundamental relationship between a matrix and its characteristic polynomial.

Example: Verifying the Cayley–Hamilton Theorem

Let's use the same matrix $A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}$ from the previous example. Its characteristic equation was $\lambda^2 - 7\lambda + 10 = 0$.

According to the Cayley–Hamilton theorem, the matrix A should satisfy this equation when $\lambda$ is replaced by A:

$A^2 - 7A + 10I = 0$

First, calculate A2:

$A^2 = A \times A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} = \begin{pmatrix} (16+2) & (4+3) \\ (8+6) & (2+9) \end{pmatrix} = \begin{pmatrix} 18 & 7 \\ 14 & 11 \end{pmatrix}$

Next, calculate 7A:

$7A = 7 \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} = \begin{pmatrix} 28 & 7 \\ 14 & 21 \end{pmatrix}$

And 10I:

$10I = 10 \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 10 & 0 \\ 0 & 10 \end{pmatrix}$

Now, substitute these into the equation $A^2 - 7A + 10I$:

$\begin{pmatrix} 18 & 7 \\ 14 & 11 \end{pmatrix} - \begin{pmatrix} 28 & 7 \\ 14 & 21 \end{pmatrix} + \begin{pmatrix} 10 & 0 \\ 0 & 10 \end{pmatrix}$

= $\begin{pmatrix} 18 - 28 + 10 & 7 - 7 + 0 \\ 14 - 14 + 0 & 11 - 21 + 10 \end{pmatrix}$

= $\begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}$

This is the zero matrix, confirming that the Cayley–Hamilton theorem holds for this matrix A.

Using Cayley-Hamilton to find the inverse:

From $A^2 - 7A + 10I = 0$, we can rearrange to find A-1:

$10I = -A^2 + 7A$

Multiply both sides by A-1:

$10I A^{-1} = (-A^2 + 7A) A^{-1}$

$10 A^{-1} = -A^2 A^{-1} + 7A A^{-1}$

$10 A^{-1} = -A + 7I$

$A^{-1} = \frac{1}{10}(-A + 7I)$

$A^{-1} = \frac{1}{10} \left( -\begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} + \begin{pmatrix} 7 & 0 \\ 0 & 7 \end{pmatrix} \right)$

$A^{-1} = \frac{1}{10} \begin{pmatrix} 3 & -1 \\ -2 & 4 \end{pmatrix} = \begin{pmatrix} 0.3 & -0.1 \\ -0.2 & 0.4 \end{pmatrix}$

This matches the inverse we calculated earlier using the formula for a 2x2 matrix.

Cayley-Hamilton Shortcut: Remember, the theorem states that a matrix 'A' will always satisfy its own characteristic polynomial 'p(λ) = 0' when 'λ' is replaced by 'A' and the constant term is multiplied by the Identity matrix 'I'. This is a powerful tool for simplifying matrix algebra and finding inverses.
``` ```html

Diagonalisation and Diagonalizability

Diagonalisation is a process of transforming a given square matrix into a diagonal matrix using a similarity transformation. A diagonal matrix is a matrix where all the off-diagonal elements are zero. Diagonal matrices are much simpler to work with, especially for operations like matrix exponentiation.

What is a Diagonal Matrix?

A diagonal matrix D is a square matrix of the form:

$D = \begin{pmatrix} d_{11} & 0 & \dots & 0 \\ 0 & d_{22} & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & d_{nn} \end{pmatrix}$

The only non-zero elements are on the main diagonal.

Diagonalisation

A square matrix A is said to be diagonalizable if there exists an invertible matrix P and a diagonal matrix D such that:

$A = PDP^{-1}$

This is also known as a similarity transformation, where D is similar to A.

The diagonal elements of D are the eigenvalues of A, and the columns of P are the corresponding eigenvectors of A.

Conditions for Diagonalizability:

An n x n matrix A is diagonalizable if and only if it has n linearly independent eigenvectors.

This condition is met if:

  • A has n distinct eigenvalues.
  • For each eigenvalue $\lambda$, the geometric multiplicity (the dimension of the eigenspace, i.e., the number of linearly independent eigenvectors for $\lambda$) is equal to its algebraic multiplicity (the number of times $\lambda$ appears as a root of the characteristic polynomial).

Steps to Diagonalize a Matrix A:

  1. Find the eigenvalues of A by solving det(A - $\lambda$I) = 0.
  2. For each distinct eigenvalue $\lambda_i$, find a basis for the corresponding eigenspace (i.e., find the linearly independent eigenvectors $v_i$).
  3. If the total number of linearly independent eigenvectors found equals the dimension of the matrix n, then A is diagonalizable.
  4. Construct the matrix P whose columns are these linearly independent eigenvectors.
  5. Construct the diagonal matrix D whose diagonal elements are the eigenvalues corresponding to the eigenvectors in P, in the same order.
  6. Then, $A = PDP^{-1}$.

Example: Diagonalizing a Matrix

Let's diagonalize $A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}$.

From previous calculations, we found:

  • Eigenvalues: $\lambda_1 = 2$, $\lambda_2 = 5$.
  • Corresponding eigenvectors: $v_1 = \begin{pmatrix} 1 \\ -2 \end{pmatrix}$ for $\lambda_1 = 2$, and $v_2 = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$ for $\lambda_2 = 5$.

Since we have two distinct eigenvalues for a 2x2 matrix, it is guaranteed to be diagonalizable. We have found two linearly independent eigenvectors.

Construct P with eigenvectors as columns:

$P = \begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix}$

Construct D with eigenvalues on the diagonal, in the same order as the eigenvectors in P:

$D = \begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix}$

Now, we need to find $P^{-1}$. For a 2x2 matrix $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$, the inverse is $\frac{1}{ad-bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix}$.

det(P) = $(1 \times 1) - (1 \times -2) = 1 - (-2) = 3$.

$P^{-1} = \frac{1}{3} \begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix} = \begin{pmatrix} 1/3 & -1/3 \\ 2/3 & 1/3 \end{pmatrix}$

Now we can verify $A = PDP^{-1}$:

$PDP^{-1} = \begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix} \begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix} \begin{pmatrix} 1/3 & -1/3 \\ 2/3 & 1/3 \end{pmatrix}$

= $\begin{pmatrix} 2 & 5 \\ -4 & 5 \end{pmatrix} \begin{pmatrix} 1/3 & -1/3 \\ 2/3 & 1/3 \end{pmatrix}$

= $\begin{pmatrix} (2/3 + 10/3) & (-2/3 + 5/3) \\ (-4/3 + 10/3) & (4/3 + 5/3) \end{pmatrix}$

= $\begin{pmatrix} 12/3 & 3/3 \\ 6/3 & 9/3 \end{pmatrix} = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} = A$.

The matrix A has been successfully diagonalized.

Diagonalizability of Special Matrices

Certain types of matrices are guaranteed to be diagonalizable:

Unitary Matrices

A square matrix U is unitary if $U^*U = UU^* = I$, where $U^*$ is the conjugate transpose of U. For real matrices, this means $U^TU = UU^T = I$, making them orthogonal matrices.

Theorem: Every unitary matrix is normal (i.e., $AU = UA^*$), and therefore, every unitary matrix is unitarily diagonalizable. This means there exists a unitary matrix P such that $A = PDP^{-1}$, where D is a diagonal matrix. The eigenvalues of a unitary matrix always have an absolute value of 1 ($|\lambda|=1$).

Orthogonal Matrices

An orthogonal matrix is a real unitary matrix. Thus, every orthogonal matrix is orthogonally diagonalizable. Its eigenvalues are either 1 or -1.

Hermitian Matrices

A square matrix H is Hermitian if $H = H^*$. For real matrices, this means the matrix is symmetric ($A = A^T$).

Theorem: Every Hermitian matrix is unitarily diagonalizable. Furthermore, all eigenvalues of a Hermitian matrix are real.

Example: $H = \begin{pmatrix} 2 & 1+i \\ 1-i & 3 \end{pmatrix}$. $H^* = \begin{pmatrix} 2 & 1-i \\ 1+i & 3 \end{pmatrix}$. Since $H = H^*$, it is Hermitian.

Symmetric Matrices

A real square matrix A is symmetric if $A = A^T$. This is a special case of Hermitian matrices where the entries are real.

Theorem (Spectral Theorem for Real Symmetric Matrices): Every real symmetric matrix is orthogonally diagonalizable. This means there exists an orthogonal matrix P such that $A = PDP^{-1}$ (or equivalently, $A = PD P^T$ since $P^{-1}=P^T$ for orthogonal matrices). All eigenvalues of a real symmetric matrix are real.

Example: $A = \begin{pmatrix} 1 & 2 \\ 2 & 3 \end{pmatrix}$. This is symmetric. We found its eigenvalues are 2 and 5 (real) and eigenvectors $\begin{pmatrix} 1 \\ -2 \end{pmatrix}$ and $\begin{pmatrix} 1 \\ 1 \end{pmatrix}$. Note that these eigenvectors are orthogonal: $(1)(1) + (-2)(1) = 1 - 2 = -1$. Wait, they are not orthogonal in this case. This implies that while the matrix is diagonalizable, the eigenvectors obtained might not be orthogonal. However, the Spectral Theorem guarantees that there *exists* an orthogonal matrix P. This means we can *choose* a set of orthogonal eigenvectors if needed, perhaps by using the Gram-Schmidt process on the basis of eigenvectors. For this specific example, if we normalize the eigenvectors:

$v_1' = \frac{1}{\sqrt{1^2+(-2)^2}}\begin{pmatrix} 1 \\ -2 \end{pmatrix} = \frac{1}{\sqrt{5}}\begin{pmatrix} 1 \\ -2 \end{pmatrix}$

$v_2' = \frac{1}{\sqrt{1^2+1^2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix}$

The matrix P formed by these normalized eigenvectors is $P = \begin{pmatrix} 1/\sqrt{5} & 1/\sqrt{2} \\ -2/\sqrt{5} & 1/\sqrt{2} \end{pmatrix}$. This matrix P is orthogonal because its columns are orthonormal.

The diagonal matrix D remains $D = \begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix}$.

Then $A = PDP^T$ (since $P^{-1} = P^T$ for orthogonal matrices).

Diagonalization Key: A matrix is diagonalizable if it has a full set of linearly independent eigenvectors. Special matrices like Hermitian (and real Symmetric) and Unitary (and real Orthogonal) are guaranteed to be diagonalizable, and their eigenvalues have special properties (real for Hermitian, magnitude 1 for Unitary). The diagonal matrix D contains eigenvalues, and the transformation matrix P contains eigenvectors.
```