Write a 2-D matrix based on the sum of some 2-D basis

26 Views Asked by At

I have a 2-D matrix ($P \in \mathbb{R}^{N\times N}$) and I have $N$ basis with size $N\times N$ called $B_i$. I want to write $P$ based on a weighted sum of $B_i$s as follow:

$P = \sum_i c_i B_i$

I know that every $B_i = u_iu_i^T$ where every $u_i$ is the eigenvector of another matrix called $Q$. I can write $Q = \sum_i \lambda_i B_i$ where $\lambda_i$ is the $i$-th eigenvalue of $Q$, but how can I find $c_i$s to write $P$ as sum of basis?