0
$\begingroup$

This is a notation question which I will illustrate with the following example: Given $x\in \mathbb{R}^4$ and $y\in \mathbb{R}^2$, and two sets $I:=\{1,2,3,4\}$ and $J:=\{2,4\}$. So $J$ represents some subvector of $x$ that I care about for certain operations with $y$, such as $x_j y_j \forall j\in J$. To me the meaning of the statement is clear, but it seems to be wrong since we are indexing the first element of $y$ as $y_2$ and the second one as $y_4$.

What is the clearest way to write this type of statements without inaccuracy?

Let me add that I would like to avoid defining new variables.

(I have come to this issue while writing constraints for optimization problems.)

$\endgroup$
  • $\begingroup$ In your example it seems that if a and x have different cardinality you would have the same problem I presented. $\endgroup$ – Septimus G Oct 25 '16 at 21:26
  • $\begingroup$ Projections projections projections. $\endgroup$ – Asaf Karagila Oct 25 '16 at 21:29
1
$\begingroup$

Let me assume $J$ is ordered.

You could define the $|J| \times |I|$ selection matrix $S(J)$ such that $S(J)x$ is the required subvector.

Alternatively, you can refer to $x_{J(i)} y_i$, where $J(i)$ is the $i^{th}$ element of $J$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.