# Recast a complex-valued problem with matrix and vector into a real-valued problem

I have this problem:

$$Hx=0_v$$

with $$H\in\mathbb{C}^{n\times n}$$ and $$x\in\mathbb{C}^{n}$$. While $$0_v$$ is the vector with all entries equal to zero. I want to recast the problem into a real valued problem. Since I took a look at this post: Represent a complex-valued matrix into real-valued matrix I tought about:

$$\begin{bmatrix} H_R&-H_i \\ H_i& H_R \end{bmatrix}x_{new}=0_v$$

With $$H_R\in\mathbb{R}^{n\times n}$$ and $$H_i\in\mathbb{R}^{n\times n}$$

But now since the dimension of the real matrix is bigger, how to redefine $$x_{new}$$ into a real vector?

## 1 Answer

Briefly, $$x_{\text{new}} = \begin{bmatrix} \Re(x)^T & \Im(x)^T \end{bmatrix}^T \in \mathbb{R}^{2n}$$ where $$\Re(x) \in \mathbb{R}^{n}$$ is the real part of $$x$$ and $$\Im(x) \in \mathbb{R}^{n}$$ is the imaginary part of $$x$$.

A general complex system $$Cz = h,$$ where $$C \in \mathbb{C}^{n \times n}$$ and $$h \in \mathbb{C}^n$$ can be expressed as $$(A+iB)(x+iy) = f + ig$$ where $$A, B \in \mathbb{R}^{n \times n}$$ and $$f, g \in \mathbb{R}^n$$. We see that this linear system is satisfied if and only if \begin{align} Ax - By &= f \\ Bx + Ay &= g \end{align} or equivalently $$\begin{bmatrix} A & -B \\ B & A \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} f \\ g \end{bmatrix}.$$ In this manner, a complex linear system can be solved using only real arithmetic. This is useful in the context of computing, say, eigenvectors of real matrices or matrix pencils for which the eigenvalues can be complex. Here the use of real arithmetic saves arithmetic operations and storage when some of the selected eigenvalues are real.