Simultaneous left and right multiplication of a matrix

Note that you shouldn’t alias H in mul!: instead use rmul! and lmul!:

lmul!(P', H)
rmul!(H, P)

There isn’t a way to do this that I know of, but if you want the Cholesky factor of P^THP, then you could just apply P directly to the Cholesky factor U of H = U^TU, since P^T H P = (UP)^T (UP)

2 Likes