SOLUTION: Find the eigenvalues λ1<λ2 and associated unit eigenvectors u⃗1,u⃗2 of the symmetric matrix. A = [35 -15; -15 -5]

Algebra ->  College  -> Linear Algebra -> SOLUTION: Find the eigenvalues λ1<λ2 and associated unit eigenvectors u⃗1,u⃗2 of the symmetric matrix. A = [35 -15; -15 -5]      Log On


   



Question 1160839: Find the eigenvalues λ1<λ2 and associated unit eigenvectors u⃗1,u⃗2 of the symmetric matrix. A = [35 -15; -15 -5]
Answer by CPhill(2303) About Me  (Show Source):
You can put this solution on YOUR website!
```python
import sympy as sp
A = sp.Matrix([[35, -15], [-15, -5]])
# Characteristic polynomial
lam = sp.symbols('lambda')
char_poly = A.charpoly(lam)
print("Char poly:", char_poly.as_expr())
eigenvals = A.eigenvects()
print("Eigenvects:")
for val, mult, vects in eigenvals:
print(f"val: {val}, mult: {mult}, vects: {vects}")
# Let's verify eigenvalues:
# det(A - lambda I) = (35 - lambda)(-5 - lambda) - (-15)^2
# = -175 - 30 lambda + lambda^2 - 225
# = lambda^2 - 30 lambda - 400 = 0
# (lambda - 40)(lambda + 10) = 0
# lambda1 = -10, lambda2 = 40
# Since lambda1 < lambda2: lambda1 = -10, lambda2 = 40.

```
```text
Char poly: lambda**2 - 30*lambda - 400
Eigenvects:
val: -10, mult: 1, vects: [Matrix([
[1/3],
[ 1]])]
val: 40, mult: 1, vects: [Matrix([
[-3],
[ 1]])]

```
```python
import numpy as np
# Confirm unit eigenvectors
v1 = np.array([1, 3]) / np.sqrt(10)
v2 = np.array([-3, 1]) / np.sqrt(10)
A_np = np.array([[35, -15], [-15, -5]])
print("A @ v1:", np.round(A_np @ v1, 4), "vs -10 * v1:", np.round(-10 * v1, 4))
print("A @ v2:", np.round(A_np @ v2, 4), "vs 40 * v2:", np.round(40 * v2, 4))
print("Dot product v1 . v2:", np.dot(v1, v2))
print("Norm v1:", np.linalg.norm(v1))
print("Norm v2:", np.linalg.norm(v2))

```
```text
A @ v1: [-3.1623 -9.4868] vs -10 * v1: [-3.1623 -9.4868]
A @ v2: [-37.9473 12.6491] vs 40 * v2: [-37.9473 12.6491]
Dot product v1 . v2: 0.0
Norm v1: 0.9999999999999999
Norm v2: 0.9999999999999999

```
To find the eigenvalues and unit eigenvectors of the matrix:
$$A = \begin{pmatrix} 35 & -15 \\ -15 & -5 \end{pmatrix}$$
---
### 1. Eigenvalues ($\lambda_1 < \lambda_2$)
Find the roots of the characteristic polynomial given by $\det(A - \lambda I) = 0$:
$$\det \begin{pmatrix} 35 - \lambda & -15 \\ -15 & -5 - \lambda \end{pmatrix} = 0$$
$$(35 - \lambda)(-5 - \lambda) - (-15)(-15) = 0$$
$$\lambda^2 - 30\lambda - 175 - 225 = 0$$
$$\lambda^2 - 30\lambda - 400 = 0$$
Factoring the quadratic equation:
$$(\lambda - 40)(\lambda + 10) = 0$$
Since $\lambda_1 < \lambda_2$:
* **$\lambda_1 = -10$**
* **$\lambda_2 = 40$**
---
### 2. Associated Unit Eigenvectors
#### For $\lambda_1 = -10$:
Solve $(A - (-10)I)\vec{v}_1 = \mathbf{0}$:
$$\begin{pmatrix} 45 & -15 \\ -15 & 5 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$$
From the first row:

$$45x_1 - 15x_2 = 0 \implies x_2 = 3x_1$$
Choosing $x_1 = 1$ gives an eigenvector:

$$\vec{v}_1 = \begin{pmatrix} 1 \\ 3 \end{pmatrix}$$
Normalize to obtain the unit eigenvector $\vec{u}_1$:

$$\Vert{}\vec{v}_1\Vert{} = \sqrt{1^2 + 3^2} = \sqrt{10}$$
$$\vec{u}_1 = \frac{1}{\sqrt{10}} \begin{pmatrix} 1 \\ 3 \end{pmatrix} = \begin{pmatrix} \frac{1}{\sqrt{10}} \\ \frac{3}{\sqrt{10}} \end{pmatrix} \quad \left(\text{or } \begin{pmatrix} -\frac{1}{\sqrt{10}} \\ -\frac{3}{\sqrt{10}} \end{pmatrix}\right)$$
---
#### For $\lambda_2 = 40$:
Solve $(A - 40I)\vec{v}_2 = \mathbf{0}$:
$$\begin{pmatrix} -5 & -15 \\ -15 & -45 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}$$
From the first row:

$$-5x_1 - 15x_2 = 0 \implies x_1 = -3x_2$$
Choosing $x_2 = 1$ gives an eigenvector:

$$\vec{v}_2 = \begin{pmatrix} -3 \\ 1 \end{pmatrix}$$
Normalize to obtain the unit eigenvector $\vec{u}_2$:

$$\Vert{}\vec{v}_2\Vert{} = \sqrt{(-3)^2 + 1^2} = \sqrt{10}$$
$$\vec{u}_2 = \frac{1}{\sqrt{10}} \begin{pmatrix} -3 \\ 1 \end{pmatrix} = \begin{pmatrix} -\frac{3}{\sqrt{10}} \\ \frac{1}{\sqrt{10}} \end{pmatrix} \quad \left(\text{or } \begin{pmatrix} \frac{3}{\sqrt{10}} \\ -\frac{1}{\sqrt{10}} \end{pmatrix}\right)$$
---
### Final Result
* **$\lambda_1 = -10$**, with unit eigenvector:
$$\vec{u}_1 = \begin{pmatrix} \frac{1}{\sqrt{10}} \\ \frac{3}{\sqrt{10}} \end{pmatrix}$$

* **$\lambda_2 = 40$**, with unit eigenvector:
$$\vec{u}_2 = \begin{pmatrix} -\frac{3}{\sqrt{10}} \\ \frac{1}{\sqrt{10}} \end{pmatrix}$$