Let $I_t$, $I$, $V$, $Z$ be vectors and $R$, $B$, $P$, $A$, $\mathcal{K}$, $\mathcal{P}$ be some matrices such that

$$ \begin{eqnarray} S&=&-(R I+B^\top V)^\top \mathcal{R}(R I+B^\top V) \\&&-(I_t+B I- P V+A Z)^\top \mathcal{P}(I_t+B I- P V+A Z) \\&&+(I_t+B I- P V)^\top \mathcal{K}(I_t+B I- P V) \end{eqnarray}$$

is a scalar quantity. Is there a way to use mathematica's symbolic computation to rewrite it as \begin{eqnarray} S&=&-\begin{bmatrix} I_t & I & V & Z \end{bmatrix} \underbrace{\begin{bmatrix} \star & \star & \star & \star\\ \star & \star & \star & \star\\ \star & \star & \star & \star\\ \star & \star & \star & \star \end{bmatrix}}_{\textbf M} \begin{bmatrix} I_t \\I\\V\\Z \end{bmatrix} \end{eqnarray}.

PS: I am trying to check if the $S\leq 0$ for all $I_t$, $I$, $V$ and $Z$.

  • 1
    $\begingroup$ Try m = 1/2 D[-s, {{it, i, v, z}, 2}]. Note that I, like several other capital letters` is the built-in symbol, so that I had to decapitalized all symbols. $\endgroup$ – Henrik Schumacher Aug 28 '18 at 20:59
  • $\begingroup$ Sorry for the caps. I tried it earlier, it did not work as they are all vectors and Matrices. Mathematica is not considering them to be vectors (Matrices) variables. $\endgroup$ – kosa Aug 28 '18 at 21:02
  • $\begingroup$ see also: PositiveDefiniteMatrixQ $\endgroup$ – kglr Aug 28 '18 at 23:51

Your Answer

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

Browse other questions tagged or ask your own question.