# [SOLVED] matrix manipulation

• Aug 8th 2007, 07:37 AM
jcrennes2
[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
• Aug 8th 2007, 09:27 AM
JakeD
Quote:

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 $AB$ is less than or equal to the rank of either $A$ or $B.$

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

$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 $U$ by to increase the rank from 1 to 3. After every multiplication, the rank will be less than or equal to 1.