1

Is there a way to mathematically transform a vector to another with values of the first one being the indices of the second one?

For example Y=[1 0 0 0 1 1 0 0 0] and X=[1 5 6] So X shows the indices of Y elements equal to 1, while others are 0.
Could there be a matrix Q that could transform X to Y where Y=XQ?

  • This question should probably be on Mathematics or even Math Overflow. Also, I don't think the answer is going to be trivial. Out of curiosity why do you need a matrix operator for this, as opposed to a broader algorithm? – shadowtalker Jun 25 '14 at 03:39
  • I need to do matrix transformations to fit my system into a Riccati eqn format for a Dynamic Programming solution. If I could express everything (state space, quadratic cost terms, etc) in terms of matrix transformations, I would easily get an optimal policy from Riccati eqn solution. I understand that my question might be more suitable for Math Overflow. –  Jun 26 '14 at 01:28
  • 2
    Because matrix operations represent linear transformations and the relationship between Y and X is not linear, no such Q exists. – whuber Jun 26 '14 at 01:45

1 Answers1

0

Sort of. In the specific case you give, you could do the following:

$$ \operatorname{diag}(\mathbf{y}) \left[ \begin{array}{c} 1 \\ 2 \\ \vdots \\ 9 \end{array} \right] = \left[ \begin{array}{c} 1 \\ 0 \\ 0 \\ 0 \\ 5 \\ 6 \\ 0 \\ 0 \\ 0 \end{array} \right]. $$

Beyond that, I'm not confident that you'll be able to do much, though somebody might prove me wrong. The problem is that matrices are just linear systems and what you are after is not linear.

If you need a proper mathematical procedure to create the diagonal matrix from $\mathbf{y}$, see here.