# Help with a tricky matrix equation

Say I have the following variable length vectors containing unknown values:

$$A=\left (\begin{array}{c} a_1 \\ a_2 \\ \vdots\\ a_i\\ \end{array}\right) B=\left (\begin{array}{c} b_1 \\ b_2 \\ \vdots\\ b_j\\ \end{array}\right)$$

And the following variable length vectors and matrix (according to the size of the preceding vectors) containing known values:

$$A_T=\left (\begin{array}{c} a'_1 \\ a'_2 \\ \vdots\\ a'_i\\ \end{array}\right) B_T=\left (\begin{array}{c} b'_1 \\ b'_2 \\ \vdots\\ b'_j\\ \end{array}\right) K=\left (\begin{array}{ccc} k_{11} & \cdots & k_{1j} \\ \vdots & \ddots & \vdots \\ k_{i1} & \cdots & k_{ij}\\ \end{array}\right)$$

These are all related by the following two equations: $$A_T = A + diag(A)KB\\ B_T = B + diag(B)K^TA$$

Given all of the known values, I want to know if it is possible to solve for A and B. If so how should I go about figuring this out? I only have a basic education on matrix math.

• My bad, I edited it. The values are different, just the same length. Mar 29, 2015 at 6:34
• This looks pretty weird to me. In any case the equation are not linear in $A,B$, due to the diag factors. So standard linear algebra methods do not apply. Mar 29, 2015 at 9:05

As Marc writes, the problem is not a linear one. Yet, I did numerical tests and the results are surprising. Of course, we work with generic systems. When $i=j=3$ or $4$, the associated system of algebraic equations decompose in linear subsystems; that is, the solutions $(a_k),(b_k)$ are rational functions of the $(k_{*,*}),(a'_{*}),(b'_{*})$. Moreover, there is only a finite number of solutions in $(A,B)$; more precisely, $20$ solutions for $i=j=3$ and $70$ solutions for $i=j=4$.