Lab 13 Interactive: Symmetric and Hermitian Matrices

Explore symmetric decomposition, spectral decomposition, quadratic forms, positive definiteness, Gram matrices, and Cholesky factorization. The goal is to connect algebraic tests with geometric energy.

1. Symmetric/skew-symmetric decomposition

For any real square matrix $M$, compute $S=(M+M^T)/2$ and $K=(M-M^T)/2$.

Matrix $M$

2. Quadratic form geometry

For a symmetric $2\times2$ matrix $A$, the level curve $x^TAx=1$ is shown when possible. Positive definite matrices give ellipses.

Symmetric matrix $A=\begin{bmatrix}a&b\\b&d\end{bmatrix}$

3. Hermitian check

A $2\times2$ complex matrix $H$ is Hermitian if $H^*=H$.

Use $H=\begin{bmatrix}a&r+si\\u+vi&d\end{bmatrix}$.

4. Spectral theorem for a symmetric matrix

Use a real symmetric $2\times2$ matrix. The tool computes eigenvalues and orthonormal eigenvectors.

5. Gram matrix and $A^TA$

Enter two vectors in $\mathbb R^3$. The Gram matrix records dot products.

$v_1$

$v_2$

6. Cholesky factorization

For a positive definite symmetric matrix, $A=LL^T$.

7. Independent-study practice tasks with answers

Task A. Find the symmetric and skew-symmetric parts of $M=\begin{bmatrix}1&4\\2&3\end{bmatrix}$.
Answer: $S=\begin{bmatrix}1&3\\3&3\end{bmatrix}$ and $K=\begin{bmatrix}0&1\\-1&0\end{bmatrix}$.
Task B. Is $H=\begin{bmatrix}2&1+i\\1-i&4\end{bmatrix}$ Hermitian?
Answer: Yes, because the diagonal entries are real and the off-diagonal entries are conjugates.
Task C. Classify $A=\begin{bmatrix}3&1\\1&3\end{bmatrix}$.
Answer: Its eigenvalues are $4$ and $2$, so it is positive definite.
Task D. Why is $A^TA$ positive semidefinite?
Answer: $x^TA^TAx=\|Ax\|^2\ge0$.
Similar practice. Test $B=\begin{bmatrix}1&2\\2&1\end{bmatrix}$.
Answer: Eigenvalues are $3$ and $-1$, so $B$ is indefinite.

8. Workspace