Skip to main content
2 of 3
TeXified question a bit
Johannes Hahn
  • 9.7k
  • 2
  • 33
  • 66

How to calculate `y' * diag(A' * B * A) * y` efficiently

I want to calculate $y^T \cdot \operatorname{diag}(A^T B A) \cdot y$.

  • $y$ is a $N \times 1$ vector
  • $A$ is a $m \times N$ matrix where $N \gg m$
  • $B$ is a $m \times m$ matrix, and B is a symmetric positive definite matrix, the Cholesky decomposition $B = LL^T$ is precomputed if it is needed.

Is it possible to calculate the above expression in $O(Nm)$ complexity?

Alaya
  • 95
  • 3