# Rewriting the spectral decomposition

Given a normal complex matrix $$A$$ and knowing that $$A = U D U^\dagger$$, how can we rewrite the spectral decomposition such that $$U D U^\dagger = \sum_i \lambda_i u_i u_i^\dagger$$ where $$\lambda_i$$ are the eigenvalues and $$D$$ is the matrix of eigenvalues?

Rewriting it likely is trivial, however I have not found a nice way to show this myself or online.

Let $$x \in \mathbb{C}^n$$. I am assuming that $$u_1, u_2, \dots, u_n$$ are orthonormal. This means $$x = (x, u_1)u_1 + \dots + (x, u_n)u_n.$$ Thus $$Ax = \lambda_1(x, u_1)u_1 + \dots + \lambda_n(x, u_n)u_n.$$ We can regard a vector $$v \in \mathbb{C}^n$$ as a linear map from $$\mathbb{C}$$ to $$\mathbb{C}^n$$ in the natural way: If $$c \in \mathbb{C}$$, then set $$vc = cv$$. Therefore there is an adjoint $$v^* : \mathbb{C}^n \to \mathbb{C}$$ satisfying $$(x, v) = (v^*x, 1) = v^*x$$. Thus $$Ax = \lambda_1(u_1^*x)u_1 + \dots + \lambda_n(u_n^*x)u_n = \lambda_1u_1u_1^*x + \dots + \lambda_nu_nu_n^*x.$$ Therefore $$A = \lambda_1u_1u_1^* + \dots + \lambda_nu_nu_n^*.$$