Extracting the diagonal terms of a square matrix.

60 Views Asked by At

For a given square matrix $A\in\mathbb{R}^{m\times m}$ does there exist a matrix $B\in\mathbb{R}^{m\times m}$ such that for the product $C:=AB$ we have $C_{ii}=A_{ii},$ $1\leq i\leq m$, and $C_{ij}=0$ if $i\neq j$ ?

I think the question can be also restated in the following way:

for a given square matrix $A\in\mathbb{R}^{m\times m}$ does there exists a vector $V\in\mathbb{R}^{m\times 1}$ such that for the product $W:=AV$ we have $W_i=A_{ii},$ $1\leq i\leq m?$

1

There are 1 best solutions below

0
On BEST ANSWER

For $m > 1$, there does not necessarily exist such a matrix. For example, take $A$ to be the matrix whose entries are all $1$. Such a matrix $B$ would satisfy $AB = I$, which means that $B$ would be the inverse of $A$. However, the matrix $A$ is not invertible (and in fact has rank $1$).

We also see that your second condition is not equivalent. In particular, if we take $V = (1,0,\dots,0)^T$, then we see that we can positively answer the second question for this $A$, but not the first.

It is true, however, that a matrix that fulfills the first requirement automatically fulfills the second, which is to say that the second condition is weaker.

Note that for any invertible matrix $A$, such a $B$ can necessarily be found.