1. ## [SOLVED] matrix manipulation

hi everyone,

I have a vector u=(x y z) and I would like to transform it (by some linear manipulations) into the following matrix:
(x 0 0)
(0 y 0)
(0 0 z)

in matlab notation: [x 0 0; 0 y 0; 0 0 z]

Concretely I would like to find some matrices A and B, for example, such that:
[x 0 0; 0 y 0; 0 z 0]=A*[x y z]*B

I know that there exists the function diag() in matlab but I would like to use some linear relations to build such a matrix.

Is there somebody that could help me?

Thank you very much

JC

2. Originally Posted by jcrennes2
hi everyone,

I have a vector u=(x y z) and I would like to transform it (by some linear manipulations) into the following matrix:
(x 0 0)
(0 y 0)
(0 0 z)

in matlab notation: [x 0 0; 0 y 0; 0 0 z]

Concretely I would like to find some matrices A and B, for example, such that:
[x 0 0; 0 y 0; 0 z 0]=A*[x y z]*B

I know that there exists the function diag() in matlab but I would like to use some linear relations to build such a matrix.

Is there somebody that could help me?

Thank you very much

JC
It cannot be done. The reason is this

Theorem: The rank of matrix $\displaystyle AB$ is less than or equal to the rank of either $\displaystyle A$ or $\displaystyle B.$

$\displaystyle U = [x,y,z]$ is a 1x3 matrix of rank 1.

$\displaystyle M = \begin{bmatrix} x & 0 & 0 \\ 0 & y & 0 \\ 0 & 0 & z \end{bmatrix}$ is a matrix of rank 3 (assuming the diagonal entries are non-zero).

Because of the theorem, there is no series of matrices you can multiply $\displaystyle U$ by to increase the rank from 1 to 3. After every multiplication, the rank will be less than or equal to 1.