I know in general, matrix multiplication is not commutative, but would it be true in this special case?
$D A P D^T = A D P D^T$ where $A, D, P$ are all $n by n$ matrix. But $P$ is symmetrical and positive definite matrix and $D$ is diagonal
The context of my problem is that I have a covariance matrix $P$. I want to "scale" the standard deviation inside the matrix. i.e if $P_{ij} = \rho_{ij} \sigma_i \sigma_j $ I want to make it $\rho_{ij} d_i d_j \sigma_i \sigma_j $ where $d_i$ is the entries on the diagonal matrix $D$.
I am wondering if I "scale" my matrix before the product, is it equivalent of scaling the matrix after the product?