Solve complex system of equations for mixed real and complex unknowns

516 Views Asked by At

I have a system of $M$ complex equations

$$ \sum_{j=1}^N ( a_{ij} \ x_j + c_{ij} \ y_j)= b_i $$

where $i \in [1, M]$ and $a_{ij}, x_j, c_{ij}, b_i \in \mathbb{C}$ but $y_j \in \mathbb{R}$.

I want to solve for unknown $x_j, y_j$. Assuming $M = \frac{3}{2}N$ I have as many equations as I have unknowns and I could break the equations out in to their real and imaginary parts and put them in a big real matrix and solve using real matrix techniques. But I lose the performance advantage of using complex matrix techniques.

Is there a way to solve for the unknowns without reverting to the equivalent real and imaginary equations?

1

There are 1 best solutions below

0
On

Replacing response from a couple of years ago. Sure you can put in block form and just take advantage of complex arithmetic, but thought more about problem. The performance advantage is when there are many fewer real variables than complex variables. Don't know if worthwhile otherwise.

Prefer to use z for complex, and $\lambda$ for real. If you can put in the form \begin{equation} A z + B \lambda = u \end{equation} where $A$ and $B$ complex, and $u$ are complex. It is assumed that the matrix $A$ is invertible. The second block equation has a complex matrix $C$, a real matrix $D$, and a real valued right hand side $v$: \begin{equation} Re(C z) + D \lambda = v. \label{eq:realeq} \end{equation} Where $Re$ takes the real part of a complex expression. We use the Hadamard product, $\odot$, to apply the $Re$ function to the lower equation. The Hadamard product is used with lower precedence than the matrix multiplication. It is not defined if you try to do in the other order as the matrices are not of equal size.

\begin{equation} \begin{bmatrix} 1\\ Re \\ \end{bmatrix} \odot \begin{bmatrix} &A ~~& B \\ &C~~& D \\ \end{bmatrix} \begin{bmatrix} z \\ \lambda \end{bmatrix} = \begin{bmatrix} u \\ v \\ \end{bmatrix} \label{eq:prob} \end{equation}

Then you can follow through the derivation for use of Schur complement \begin{equation} S \equiv D- \left(CA^{-1}B \right) \label{eq:sdef} \end{equation} to get. (See the section "Application to solving linear equations" of the wiki page for Schur complement)

\begin{equation} \begin{bmatrix} z \\ \lambda \\ \end{bmatrix} = \begin{bmatrix} I_{p} &-A^{-1}B \\ & I_{q} \end{bmatrix} \begin{bmatrix} A^{-1} \\ &\left( Re \left( S \right) \right)^{-1}\\ \end{bmatrix} \begin{bmatrix} f\\ g \\ \end{bmatrix} \label{eq:inv} \end{equation} Where the single column matrix with complex $f$ and real $g$ are calculated by: \begin{equation} \begin{bmatrix} f\\ g \\ \end{bmatrix} = \begin{bmatrix} 1\\ Re \\ \end{bmatrix} \odot \begin{bmatrix} I_{p}\\ -C A^{-1} &I_{q} \\ \end{bmatrix} \begin{bmatrix} u\\ v\\ \end{bmatrix} \end{equation}

Note that it is more efficient to calculate \begin{equation} Re(CA^{-1}B) = Re(C) Re(A^{-1}B) - Im(C) Im(A^{-1} B) \end{equation} so we are better off storing $C$ as two real matrices.

Remember you can factor out reals from the real function, but not complex values. For example, $Re \left(C A^{-1} B \lambda \right) = Re \left( C A^{-1} B \right) \lambda$. It is linear over the reals, that is why you can factor out the Schur complement. But the real function is not linear over the complex field. Try comparing $i \cdot Re(i)$, $ Re(i \cdot i) $ and $ Re(i)Re(i)$.

In the case I was working on, $B$ and $C$ are conjugate transposes. All the entries to the matrix $D$ and the $u$ vector are 0. For this case, simplifies to: \begin{equation} z = A^{-1} B \left[ Re(B^{H} A^{-1} B) \right]^{-1} v, \end{equation} where we have used the superscript H to indicate the conjugate transpose. See also https://math.stackexchange.com/a/4884759/1060562