# Can we guarantee a solution to the system $b = x^T Z - Z x$ ? (w.r.t. $Z$)

Question: Can we guarantee a solution to this system?

I have a system of compartments as shown in the Figure (for $$N=3$$).

The mass flow among the compartments can be described by

$$\frac{d}{dt}x_{i} = \sum_{j}Z_{ji} \thinspace x_{j} - \sum_{j}Z_{ij} \thinspace x_{i}$$

< edit: not relevant and maybe incorrect, please ignore >

or, for the entire system ($$\mathbf{x} = [x_1,x_2,x_3]$$), $$\frac{d}{dt}\mathbf{x} = {(\mathbf{x}^T Z)}^{T} - Z \mathbf{x}$$

< / edit >

Goal: We want to solve for $$Z$$, knowing the values of the two vectors (i) $$\frac{d}{dt}\mathbf{x} = \mathbf{b}$$, and (ii) $$\mathbf{x}$$.

Approach: If we define a vector $$\mathbf{z} = \mathrm{vec}(Z)$$, then we can factor the RHS of the above to a linear system like:

\begin{align} \frac{d}{dt}\mathbf{x} = \mathbf{b} &= A \thinspace \mathbf{z} \\ &\quad \textrm{(e.g. for N=2)}\\ &= \left[\begin{array}{cccc} \cdot & -x_1 & x_2 & \cdot \\ \cdot & x_1 & -x_2 & \cdot \end{array}\right] \left[\begin{array}{c} Z_{11} \\ Z_{12} \\ Z_{21} \\ Z_{22} \end{array}\right] \\ &\quad \textrm{(e.g. for N=3)}\\ &= \left[\begin{array}{ccccccccc} \cdot & -x_1 & -x_1 & x_2 & \cdot & \cdot & x_3 & \cdot & \cdot \\ \cdot & x_1 & \cdot & -x_2 & \cdot & -x_2 & \cdot & x_3 & \cdot \\ \cdot & \cdot & x_1 & \cdot & \cdot & x_2 & -x_3 & -x_3 & \cdot \end{array}\right] \left[\begin{array}{c} Z_{11} \\ Z_{12} \\ Z_{13} \\ Z_{21} \\ Z_{22} \\ Z_{23} \\ Z_{31} \\ Z_{32} \\ Z_{33} \end{array}\right] \end{align}

Then, we can solve for $$\mathbf{z}$$ using the usual methods. The diagonal elements will be undefined, but that's fine as they are irrelevant to the compartment flows (in my case).

Specific Questions:

• It seems $$A$$ is always Rank $$N-1$$; is this true? Why?
• For any choice of $$\mathbf{b}$$ and $$\mathbf{x} \implies A$$, can we guarantee a solution $$\mathbf{z} \implies Z$$?
• If not, can we derive constraints on $$\mathbf{b}$$ and / or $$\mathbf{x}$$ to guarantee a solution?

Thanks,

• Does $x^TA-Ax$ makes sense at all? If $x$ is a $1\times 3$ row, then $A$ must be $3\times n$; but then $Ax$ should be defined, so $n=1$. However you cannot sum a $1\times1$ matrix with a $3\times3$ one. – egreg Oct 30 '18 at 15:50
• This doesn't seem to follow from the previous equation: $$\frac{d}{dt}\mathbf{x} = \mathbf{x}^T Z - Z \mathbf{x}$$ – Yuriy S Oct 30 '18 at 15:53
• Maybe you meant $Z^T x$? – Yuriy S Oct 30 '18 at 15:54
• In matrix form, the original equation should be $\dot{\mathbf x}=Z^T\mathbf x - \operatorname{diag}(Z\mathbf e)\mathbf x=Z^T\mathbf x - \operatorname{diag}(\mathbf x)Z\mathbf e$, where $\mathbf e$ is the all-one vector. So, if you put $Y= \operatorname{diag}(\mathbf x)Z$, the equation you want to solve should be (provided that $\mathbf x$ is entrywise nonzero) $\mathbf b=(Y^T-Y)\mathbf e$. – user1551 Oct 30 '18 at 15:58
• It seems my transformation to matrix form is not correct (see edit). However, the definition of $A$ in Approach should still follow from the very first equation with sums. – Jesse Knight Oct 30 '18 at 16:36