# How can I find a solution valid for all cases?

• weetabixharry
In summary, the equation tr\left\{\textbf{AB}\right\} = \sigma can be solved for all possible values of \textbf{B} that will allow it to hold, given the only constraint that tr\left\{\textbf{A}\right\} = 1. By considering the (i,j)th element of \boldsymbol{AB}, it can be determined that \boldsymbol{B} must be diagonal and that the b_{ii} terms can be eliminated from the summation. This solution may be simplified by making use of specific examples.

#### weetabixharry

How can I find a solution valid for "all" cases?

I have an equation:

$tr\left\{\textbf{AB}\right\} = \sigma$

where $tr\left\{\right\}$ denotes the matrix trace. The square matrix $\textbf{A}$ is independent of both the square matrix $\textbf{B}$ and the real scalar $\sigma$.

I want to determine all possible values of $\textbf{B}$ that will allow the above equation to hold for all $\textbf{A}$, given the only constraint:

$tr\left\{\textbf{A}\right\} = 1$

For example, I can see that $\textbf{B}=\sigma \textbf{I}$ will always be valid (where $\textbf{I}$ is the identity matrix). But can I guarantee that there are no other possible values for $\textbf{B}$?

I have been pondering this problem for some time and cannot see a way of approaching it. Any advice would be greatly appreciated!

Let $A_{i,j}$ denote a matrix whose $(i,j)$ entry is 1 and the rest of whose entries are zero. If the equation was true for all matrices it would work for each $A_{i,j}$. Is that going to be possible?

Stephen Tashi said:
Let $A_{i,j}$ denote a matrix whose $(i,j)$ entry is 1 and the rest of whose entries are zero. If the equation was true for all matrices it would work for each $A_{i,j}$. Is that going to be possible?

I think we can only consider the $A_{i,i}$ matrices (i.e. a diagonal entry is 1), in order to satisfy the trace constraint on $A$. However, I'll look into an approach like this. I have found a possible solution in a similar way - by considering the (i,j)th element. I'll check it over and post it here if I think it has any chance of being correct...

I hope someone will have the time to read through the following attempt and point out any errors in my reasoning:

The $\left( i,i\right) ^{th}$ element of $\boldsymbol{AB}$ can be written as:

$\left[ \boldsymbol{AB}\right] _{i,i}=\sum_{j=1}^{N}a_{ij}b_{ji}$

Therefore the trace is:

${tr}\left\{ \boldsymbol{AB}\right\} =\sum_{i=1}^{N}\sum_{j=1}^{N}a_{ij}b_{ji}=\sigma$

Our only constraint is:

${tr}\left\{ \boldsymbol{A}\right\} =\sum_{i=1}^{N}a_{ii}=1$

Therefore, we can write:

$\begin{eqnarray*} {tr}\left\{ \boldsymbol{AB}\right\} &=&\sigma {tr}\left\{ \boldsymbol{A}\right\} \\ \sum_{i=1}^{N}\sum_{j=1}^{N}a_{ij}b_{ji} &=&\sigma \sum_{i=1}^{N}a_{ii} \end{eqnarray*}$

Clearly, the right hand side is only a function of diagonal terms.
Therefore, the $a_{ij}$ ($i\neq j$) terms must be eliminated from the left
hand side by assuming all $b_{ji}$ ($j\neq i$) terms are zero.

Therefore $\boldsymbol{B}$ must be diagonal and:

$\sum_{i=1}^{N}a_{ii}b_{ii}=\sigma \sum_{i=1}^{N}a_{ii}$

The only way (I think) $\boldsymbol{B}$ can satisfy this in general is if
the $b_{ii}$ terms can be removed from the summation (i.e. they are a
constant). Clearly, that constant is $\sigma$:

$\boldsymbol{B}=\sigma \boldsymbol{I}$

I didn't quite follow your argument about diagonal terms, but I think you have at least started on the right track. I also think you're making it a bit more complicated than it needs to be. I would begin like this: Let A be an arbitrary matrix such that Tr A=1. Let B be an arbitrary matrix such that Tr(AB)=σ. Then Tr(AB)=σTr(A).

Now start making specific choices of A, to see how they constrain B. For example, what does the equality Tr(AB)=σTr(A) say when A11=1 and all other components of A are =0?

Thanks for the advice. I think this idea of choosing various specific examples for $\textbf{A}$ is a very good one and could simplify matters significantly. I'll see what I can come up with...