Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there a way to filter out only the diagonal elements of a matrix $A$, by doing a matrix multiplication with some matrix $B$ like this:

$A*B$ = $D$

where $D$ matrix contains only diagonal elements of $A$?

share|cite|improve this question

1 Answer 1

No, unless $A$ is $1\times1$. Try $A=\pmatrix{1&0\\ 1&0}$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.