# How can we transform matrices into scalars?

If we have the three matrices:

$$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} , \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \\ \end{bmatrix} , \text{ and } \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ \end{bmatrix}$$

How can I transform the matrices so that the first one (the identity) becomes a constant (scalar) $n$, and the other two become 0?

I'm not exactly sure what I'm looking for, but I'm looking for as many ways as possible to do this transformation with the hope that I'll find a way that works. Again, I'm looking for a way to transform the matrices into a scalar.

-

The most obvious one to me seems like the trace operation, i.e. the sum of the elements along the leading diagonal. For example: $$\text{tr}\left(\left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right]\right) = 1+1+1 = 3$$ $$\text{tr}\left(\left[\begin{array}{ccc} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{array}\right]\right) = 0+0+0 = 0$$ $$\text{tr}\left(\left[\begin{array}{ccc} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{array}\right]\right) = 0+0+0 = 0$$ The trace is important for many reasons:
@MattGroff If you multiply an n-by-n matrix by a vector, i.e. on the right by an n-by-1 or on the left by a 1-by-n matrix then the result will be a vector and not a number. If you want a number then you'll need to multiply on both the left and the right, e.g. $uXv^{\top}$. – Fly by Night Sep 4 '13 at 18:46
@MattGroff Lets say you multiply on the left by $u=[a,b,c]$ and on the right by $v^{\top} = [d,e,f]^{\top}$, then you need to solve the equations $ad+be+cf=n$, $ae+bf+cd=0$ and $af+bd+ce=0$. We can rewrite this as $$\left[\begin{array}{ccc} a & b & c \\ c & a & b \\ b & c & a \end{array}\right]\left[\begin{array}{c} d \\ e \\ f \end{array}\right] = \left[\begin{array}{c} n \\ 0 \\ 0 \end{array}\right].$$ Assuming the 3-by-3 matrix is non-singular, you can solve for $d,$ $e$ and $f$. The matrix is non-singular if $$(a+b+c)(a^2+b^2+c^2-ab-ac-bc) \neq 0$$ – Fly by Night Sep 4 '13 at 19:07