1 Introduction

Throughout, \(A\in \mathbb {C}^{m\times n}\) stays for a \(m\times n \) matrix over a complex number field \(\mathbb {C}\). Additionally, the rank of a matrix \(A\in \mathbb {C}\) is denoted by r(A). The conjugate transpose of A is written by \(A^*\). An identity matrix with plausible shape is denoted by I. The Moore–Penrose inverse of A is represented by \(A^\dagger =T\) and is defined as a solution to the following system:

$$\begin{aligned}{} & {} AT A=A,~~T AT=T,~~(AT)^*=AT,~~(T A)^*=T A. \end{aligned}$$

Furthermore, \(L_A=I-A^*A\) and \(R_A=I-AA^*\) are projectors onto the kernel of A, such that \(AL_A=0\) and \(R_AA=0\), where I and 0 stand for the identity matrix and a zero matrix, respectively. Moreover,

$$\begin{aligned} L_A=(L_A)^*=(L_A)^2=L_A^\dagger , ~~R_A=(R_A)^2=(R_A)^*=R_A^\dagger . \end{aligned}$$

The solution of matrix equations have backbone position in different fields of sciences and engineering like system design [49], singular system control [13], linear descriptor system [11], and sensitivity analysis [5]. For instance, Bai computed the iterative solution of \(A_1X+XA_2=B\) in [2] and \(A_1X+YA_2=B\) was considered by different researchers in [3, 45].

Similarly, the solution of system of Sylvester matrix equations also has been observed by different researchers with different techniques. Recently, the general solution of

$$\begin{aligned} \begin{aligned} A_1X_1+Z_1B_1=C_1,~~ A_2X_2+Z_1B_2=C_2 \end{aligned} \end{aligned}$$
(1.1)

was computed in [50] when this system is consistent. Some solvability conditions and condition number to (1.1) were also given in [25, 27]. Wang et al. in [52] evaluated the constraint solution of (1.1). When \(X_2=X_1\) in (1.1), then some necessary and sufficient conditions of (1.1) were given in [54]. Wang and He also gave some necessary and sufficient conditions for

$$\begin{aligned} A_1X_1+Z_1B_1=C_1,~~ A_2Z_1+X_2B_2=C_2, \end{aligned}$$

to have a solution with its general solution in [15]. Some latest research papers related to the general solution of different types of Sylvester matrix equations can be viewed in [7, 29,30,31, 33,34,35,36,37,38,39,40,41,42,43,44, 52, 53, 55,56,59]

The numerical solution of two-sided Sylvester matrix equation was explored in [6]. A researcher in [16] discussed the triangular two-sided Sylvester matrix equation. The Hermitian solution of

$$\begin{aligned} A_1XA_1^{*}+B_1YB_1^{*}=C_1 \end{aligned}$$
(1.2)

is presented in [28]. Some findings on (1.2) can be viewed in [12]. Very recently, an algorithm to find out the solution of

$$\begin{aligned} \begin{aligned} A_1XB_1+C_1YD_1=E_1,\\ A_2ZB_2+C_2YD_2=E_2 \end{aligned} \end{aligned}$$
(1.3)

was constructed in [14], and recently, the Hermitian solution to (1.3) has been carried out in [36] with its general solution when this system is consistent.

Very recently, the authors in [43] researched the skew-Hermitian solution of the system

$$\begin{aligned} \begin{aligned}&A_1UA_1^{*} {+} B_1 VB_1^{*}=C_1,~C_1={-}C_1^{*},\\&A_2WA_2^{*} {+} B_2VB_2^{*}=C_2,~C_2={-}C_2^{*}, \end{aligned} \end{aligned}$$
(1.4)

when it is consistent. They also presented the closed form of formula for the general solution when this system is consistent over the complex plane \(\mathbb {C}\).

Motivated by the above research and the formidable applications of generalized Sylvester matrix equations in the fields like feedback [48] and perturbation theory [26], we, in this paper, consider the skew-Hermitian system of Sylvester matrix equations

$$\begin{aligned} \begin{aligned} D_1X_1-(D_1X_1)^*+E_1Y_1E_1^{*}+F_1 Z_1F_1^{*}=G_1,~G_1=-G^{*}_1,\\ D_2X_2-(D_2X_2)^*+E_2Y_2E_2^{*}+F_2 Z_1F_2^{*}=G_2,~G_2=-G^{*}_2, \end{aligned} \end{aligned}$$
(1.5)

over the complex number field \(\mathbb {C}\). By solving (1.5) will definitely reinforce the application of system of skew-Hermitian Sylvester matrix equations into a variety of number of fields of sciences and engineering and their allied areas.

To start with, we give some significant results which will be used in the construction of the main result of this paper.

Lemma 1.1

[32]. Let \(K\in \mathbb {C}^{m\times n},~P\in \mathbb {C}^{m\times t},~Q\in \mathbb {C}^{l\times n}\). Then

$$\begin{aligned} r\left[ \begin{array}{c} K \\ Q \\ \end{array} \right]{} & {} -r(QL_K)=r(K),~~ r\left[ \begin{array}{cc}K &{} P \\ \end{array} \right] -r(R_PK)=r(P),\\{} & {} r\left[ \begin{array}{cc} K &{} P \\ Q &{} 0\\ \end{array} \right] -r( P)-r(Q)=r(R_PKL_Q). \end{aligned}$$

Lemma 1.2

[51]. Let A, B, and C be given matrices with right sizes over \(\mathbb {C}\). Then

  1. (1)

    \(A^\dagger =(A^*A)^\dagger A^*=A^*(AA^*)^\dagger .\)

  2. (2)

    \(L_A=L_A^2=L_A^*, R_A=R_A^2=R_A^*.\)

  3. (3)

    \(L_A(BL_A)^\dagger =(BL_A)^\dagger , (R_AC)^\dagger R_A=(R_AC)^\dagger .\)

In obtaining the general solution to (1.5), we need the general solution of

$$\begin{aligned} AX-(AX)^{*}+BYB^{*}+CZC^{*}=D,~D=-D^*,~Y=-Y^*,~Z=-Z^*. \end{aligned}$$
(1.6)

Lemma 1.3

[40]. Let A,  B,  C, and \(D=- D^*\) be given coefficient matrices in (1.6) over \(\mathbb {C}\) with conformable sizes. Denote

$$\begin{aligned}{} & {} A_1=R_{A}B,~B_1=R_{A}C,~C_1=R_{A}DR_{A},~M=R_{A_1}B_1,~S=B_1L_M. \end{aligned}$$

Then

  1. (1)

    Eq. (1.6) has a solution (XYZ), where \(Y=-Y^*\) and \(Z=-Z^*\).

  2. (2)

    The coefficient matrices in (1.6) satisfy

    $$\begin{aligned}{} & {} ~R_MR_{A_1}C_1=0,~R_{A_1}C_1R_{B_{1}}^*=0. \end{aligned}$$
  3. (3)

    \( MM^\dagger R_{A_1}C_1=R_{A_1}C_1=R_{A_1}C_1(B_1^\dagger )^*B_1^*. \)

  4. (4)
    $$\begin{aligned} r\left[ \begin{array}{cccc} D&{} C &{}B &{} A\\ A^*&{} 0 &{} 0 &{} 0 \\ \end{array}\right]= & {} r\left[ \begin{array}{ccc} C&{} B&{} A \\ \end{array} \right] +r(A),\\ r\left[ \begin{array}{ccc} D &{} B&{} A\\ A^*&{} 0 &{} 0 \\ C^*&{} 0 &{} 0 \\ \end{array}\right]= & {} r\left[ \begin{array}{cc} B &{} A\\ \end{array} \right] +r\left[ \begin{array}{cc} A &{} C \\ \end{array}\right] \end{aligned}$$

are equivalent statements. Under these conditions, the general solution to the system (1.6) can be demonstrated as

$$\begin{aligned} Y= & {} -Y^*=A_1^\dagger C_1(A_1^\dagger )^*-\frac{1}{2}A_1^\dagger B_1M^\dagger C_1[I+(B_1^\dagger )^*S^*](A_1^\dagger )^*\\{} & {} \quad -\frac{1}{2}A_1^\dagger [I+SB_1^\dagger ]C_1(M^\dagger )^*B_1^*(A_1^\dagger )^*-A_1^\dagger S W_2S^*(A_1^\dagger )^*-L_{A_{1}}U+U^*L_{A_1}^*,\\ Z= & {} -Z^*=\frac{1}{2}M^\dagger C_1({B_1}^\dagger )^*[I+S^\dagger S]+\frac{1}{2}[I+S^\dagger S]B_1^\dagger C_1(M^\dagger )^*\\{} & {} \quad +L_MW_2L_M^*-VL_{B_{1}}^*+L_{B_1}V^*+L_ML_SW_1-W_1^*(L_ML_S)^*,\\ X= & {} A^\dagger [D-BYB^*-CZC^*]-\frac{1}{2}A^\dagger [D-BYB^*-CZC^*](A^\dagger )^*A^*\\{} & {} \quad -L_AU_1+U_2^*(A^\dagger )^*A^*+A^\dagger U_2A^*, \end{aligned}$$

where \(U_1,~U_2,~W_1,~U,~V\), and \(W_2^*=-W_2\) are arbitrary matrices over \(\mathbb {C}\).

The skew-Hermitian solution to the system (1.5) will be expressed in terms of the Moore–Penrose (MP-) inverse. Thanks to the important role of generalized inverses in many application fields, considerable effort has been exerted toward the numerical algorithms for fast and accurate calculation of matrix generalized inverse. In general, most existing methods for their obtaining are iterative algorithms for approximating generalized inverses of complex matrices (some recent papers, see, e.g., [1, 46]). There are only several direct methods finding MP-inverse for an arbitrary complex matrix. The most famous is method based on singular value decomposition (SVD), i.e., if \(A=U\Sigma V^*\), then \(A^\dag =V\Sigma ^\dag U^*\). Another approach is constructing determinantal representations of the MP-inverse \(A^\dag \). There are various determinantal representations of generalized inverses (for the MP-inverse, see, e.g., [4, 47]). Because of the complexity of the previously obtained expressions of determinantal representations of the MP-inverse, they do not found a wide applicability.

In this paper, it is used the determinantal representations of the MP-inverse recently derived by one of authors in [17].

Lemma 1.4

[17, Theorem 2.2] If \( {A} \in {\mathbb {C}}^{m\times n}_r \), then the MP-inverse \( {A}^{ \dag } = \left( {a_{ij}^{ \dag } } \right) \in {\mathbb {C}}^{n\times m} \) possesses the following determinantal representations:

$$\begin{aligned} a_{ij}^{ \dag } = {\frac{{{\sum _{\beta \in J_{r,n} {\left\{ {i} \right\} }} { \left| {\left( { { A}^{ *} { A}} \right) _{. i} \left( { { a}_{.j}^{ *} } \right) } \right| _{\beta } ^{\beta } } } }}{{{\sum _{\beta \in J_{r,n}} {{\left| { A}^{ *} { A} \right| _{\beta } ^{\beta } }}} }}}= {\frac{{{\sum _{\alpha \in I_{r,m} {\left\{ {j} \right\} }} { \left| {( { A} { A}^{ *} )_{j.} ( { a}_{i.}^{ *} )} \right| _{\alpha } ^{\alpha } } }}}{{{\sum _{\alpha \in I_{r,m}} {{ {\left| {A}{ A}^{ *} \right| _{\alpha } ^{\alpha } } }}} }}}. \end{aligned}$$
(1.7)

Here, \( |{ A}|_{\alpha } ^{\alpha } \) denotes a principal minor of A whose rows and columns are indexed by \(\alpha : = \left\{ {\alpha _{1},\ldots ,\alpha _{k}} \right\} \subseteq {\left\{ {1,\ldots ,m} \right\} }\)

$$\begin{aligned} \textit{L}_{ k, m}: = {\left\{ {\alpha :\,\, 1 \le \alpha _{1}< \cdots < \alpha _{k} \le m} \right\} },~ \text {and}~ I_{r, m} {\left\{ {i} \right\} }: = {\left\{ {\alpha :\alpha \in L_{r, m}, i \in \alpha } \right\} }. \end{aligned}$$

Also, \( {a}_{.j}^{*}\) and \( {a}_{i.}^{*} \) denote the jth column and the ith row of \( { A}^*\), and \({A}_{i.} \left( {b} \right) \) and, respectively, and \( {A}_{.j} \left( {c} \right) \) stand for the matrices obtained from A by replacing its ith row with the row vector \({b} \in {\mathbb {C}}^{1\times n}\) and its jth column with the column vector \({c} \in {\mathbb {C}}^{m}\).

The formulas (1.7) mean calculations of sum of all principal minors of r order of the matrices \(A^*A\) or \(AA^*\) in denominators and sum of principal minors of r order of the matrices \((A^*A)_{.i}(a_{.j}^*)\) or \((AA^*)_{j.}(a_{i.}^*)\) that contain the ith column or the jth row, respectively, in numerators.

Note that these new determinantal representations of the Moore–Penrose inverse have been extended over quaternion matrices [18] as well. This method was successfully applied for constructing determinantal representations of other generalized inverses in both cases for complex and quaternion matrices (see, e.g., [20, 21]). It also yields Cramer’s rules of various matrix equations [19, 22,23,24, 34, 41, 42].

Our paper is composed of four sections. The general solution to (1.5) is constituted in Sect. 2 with a special case. The algorithm and numerical example of finding the anti-Hermitian solution of (1.5) are presented in Sect. 3. A conclusion to this paper is given in Sect. 4.

2 Main result

Now, we present the main Theorem of this paper.

Theorem 2.1

Given  \(D_1,~D_2,~E_1,~E_2,~ F_1,~F_2,~G_1=G_1^{*},~G_2=-G_2^{*}\) be matrices of conformable shapes over \(\mathbb {C}\). Assign

$$\begin{aligned} \begin{aligned}&A_1=R_{D_1}E_1,~B_1=R_{D_1}F_1,~C_1=R_{D_1}G_1R_{D_1}, ~A_2=R_{D_2}E_2,~B_2=R_{D_2}F_2,~C_2=R_{D_2}G_2R_{D_2},\\&M_1=R_{A_1}B_1,~S_1=B_1L_{M_1},~M_2=R_{A_2}B_2,~S_2=B_2L_{M_2},~A_4=R_{A_3}L_{M_1}, ~A_5=R_{A_3}L_{M_2},\\&W^*=\left[ \begin{array}{cccc} U_2^*&{} U_{3} &{}U_{22}^*&{} U_{33} \\ \end{array} \right] ,~A_3=\left[ \begin{array}{cccc} L_{M_1}L_{S_1} &{} L_{B_1} &{} -L_{M_2}L_{S_2}&{} -L_{B_2} \\ \end{array} \right] ,~M_3=R_{A_4}A_5,\\ {}&S_3=A_5L_{M_3},~ Z_{02}=\frac{1}{2}M_2^\dagger C_2(B_2^\dagger )^*(I+S_2^\dagger S_2)+\frac{1}{2}(I+S_2^\dagger S_2)B_2^\dagger C_2(M_2^\dagger )^*,~E_{11}=Z_{02}-Z_{01},\\&~Z_{01}=\frac{1}{2}M_1^\dagger C_1(B_1^\dagger )^*(I+S_1^\dagger S_1)+\frac{1}{2}(I+S_1^\dagger S_1)B_1^\dagger C_1 (M_1^\dagger )^*,~E_{22}=R_{A_{3}}E_{11}R_{A_{3}}. \end{aligned}\nonumber \\ \end{aligned}$$
(2.1)

Then, the following conditions are equivalent:

  1. (1)

    System (1.5) is consistent.

  2. (2)

    The following equalities hold:

    $$\begin{aligned} \begin{aligned}&R_{A_1}C_1R_{B_1}^{*}=0,~~R_{M_1}R_{A_1}C_1=0, \\&R_{A_2}C_2R_{B_2}^{*}=0,~~R_{M_2}R_{A_2}C_2=0,\\&R_{A_4}E_{22}R_{A_5}^*=0,~~~R_{M_3}R_{A_4}E_{22}=0. \end{aligned} \end{aligned}$$
    (2.2)
  3. (3)

    The following rank equalities hold:

    $$\begin{aligned}&r\left[ \begin{array}{ccc} G_1&{}E_1 &{} D_1 \\ F_1^{*} &{} 0&{}0 \\ D_1^*&{}0&{}0\\ \end{array} \right] =r[D_1~~~E_1]+r[D_1~~~F_1], \end{aligned}$$
    (2.3)
    $$\begin{aligned}&r\left[ \begin{array}{cccc} G_1 &{}E_1 &{} F_1 &{}D_1\\ D_1^*&{}0&{}0&{}0 \end{array} \right] =r\left[ \begin{array}{ccc} D_1 &{} E_1 &{}F_1\\ \end{array} \right] +r(D_1), \end{aligned}$$
    (2.4)
    $$\begin{aligned}&r\left[ \begin{array}{ccc} G_2&{}E_2 &{} D_2 \\ F_2^{*} &{} 0&{}0 \\ D_2^*&{}0&{}0\\ \end{array} \right] =r[D_2~~~E_2]+r[D_2~~~F_2], \end{aligned}$$
    (2.5)
    $$\begin{aligned}&r\left[ \begin{array}{cccc} G_2 &{}E_2 &{} F_2 &{}D_2\\ D_2^*&{}0&{}0&{}0 \end{array} \right] =r\left[ \begin{array}{ccc} D_2 &{} E_2 &{}F_2\\ \end{array} \right] +r(D_2),\end{aligned}$$
    (2.6)
    $$\begin{aligned}&r\left[ \begin{array}{cccccccc} 0&{}B_2^*&{} 0&{}0&{} B_2^*&{} 0&{} 0 \\ 0&{}0&{} B_1^*&{} 0 &{} B_2^*&{} 0&{} 0 \\ 0&{} 0&{} 0&{}B_1^*&{} B_2*&{} 0 &{} 0 \\ 0&{} 0&{} -C_1 &{} 0 &{} 0 &{} B_1&{}A_1\\ B_2 &{} -C_2&{} 0&{} 0&{} 0 &{} 0 &{} 0 \\ 0&{} A_2^*&{} 0 &{} 0 &{} 0&{} 0&{} 0 \\ \end{array} \right] \nonumber \\&=~r\left[ \begin{array}{cccc} B_1 &{} 0&{} 0 &{} A_1 \\ 0&{}B_1 &{} 0 &{} 0 \\ 0 &{} B_2 &{}-B_2&{} 0 \\ B_2&{} 0&{}B_2&{} 0\\ \end{array} \right] +r\left[ \begin{array}{ccc} B_2 &{} B_2 &{} -A_2 \\ B_1&{} 0&{} 0 \\ 0&{}B_1 &{} 0 \\ \end{array} \right] , \end{aligned}$$
    (2.7)
    $$\begin{aligned}&r\left[ \begin{array}{ccccccccc} 0 &{} 0 &{} B_1^*&{} 0&{} 0 &{} B_2^*&{} 0 &{} 0 \\ 0 &{} 0 &{} 0&{} B_1^*&{} 0 &{} B_2^*&{} 0 &{} 0 \\ 0 &{} 0&{} 0&{} 0 &{} B_2^*&{}- B_2^*&{} 0 &{} 0\\ -B_2 &{}- B_2 &{} 0&{} 0&{} 0 &{}- C_2 &{} A_2 &{} 0 \\ B_1 &{} 0 &{}C_1&{} 0 &{} 0&{} 0&{} 0&{} A_1 \\ 0 &{} B_1 &{} 0 &{} 0 &{} 0&{} 0 &{} 0 &{} 0\\ \end{array} \right] \nonumber \\&=r\left[ \begin{array}{cccc} B_2 &{} B_2&{} -A_2 &{} 0 \\ B_1 &{} 0 &{} 0 &{} A_1 \\ 0 &{} B_1 &{} 0 &{} 0 \\ \end{array} \right] +r\left[ \begin{array}{cc} B_1 &{} B_1 \\ B_2 &{} 0 \\ 0 &{} B_2 \\ \end{array} \right] . \end{aligned}$$
    (2.8)

Under these conditions, the general solution to (1.5) is

$$\begin{aligned} \begin{aligned}&X_1=D_1^\dagger (G_1-E_1Y_1E_1^{*} -F_1Z_1F_1^{*})-\frac{1}{2}D_1^\dagger (G_1-E_1Y_1E_1^{*} -F_1Z_1F_1^{*})D_1D_1^\dagger \\&~~~~~~~~~~+D_1^\dagger T_1D_1^*+T_2^*D_1D_1^\dagger -L_{D_1}T_3,\\&X_2=D_2^\dagger (G_2-E_2Y_2E_2^{*} -F_2Z_1F_2^{*})-\frac{1}{2}D_2^\dagger (G_2-E_2Y_2E_2^{*} -F_2Z_1F_2^{*})D_2D_2^\dagger \\&~~~~~~~~~~+D_2^\dagger T_{11}D_2^*+T_{22}^*D_2D_2^\dagger -L_{D_2}T_{33},\\&Y_1=-Y_1^{*}=A_1^\dagger C_1(A_1^\dagger )^*-\frac{1}{2}A_1^\dagger B_1M_1^\dagger C_1[I+(B_1^\dagger )^*S_1^*](A_1^\dagger )^*\\&\quad \quad \quad -\frac{1}{2}A_1^\dagger [I+S_1 B_1^\dagger ]C_1 (M_1^\dagger ) ^*B_1^{*} (A_1^\dagger )^*- A_1^\dagger S_1U_1S_1^*(A_1^\dagger )^*-L_{A_1} V_1+V_1^*L_{A_1},\\&Y_2=-Y_2^{*}=A_2^\dagger C_2(A_2^\dagger )^*- \frac{1}{2}A_2^\dagger B_2M_2^\dagger C_2[I+(B_2^\dagger )^*S_2^*] (A_2^\dagger )^*\\&\quad \quad \quad -\frac{1}{2}A_2^\dagger [I+S_2B_2^\dagger ]C_2 (M_2^\dagger )^*B_2^{*} (A_2^\dagger )^*-A_2^\dagger S_2U_{11}S_2^*(A_2^\dagger )^*- L_{A_2}V_{11}+V_{11}^*L_{A_{2}},\\&Z_1=\frac{1}{2}M_1^\dagger C_1(B_1^\dagger )^*(I+S_1^\dagger S_1)+\frac{1}{2}(I+S_1^\dagger S_1)B_1^\dagger C_1 (M_1^\dagger )^*+L_{M_1}U_1L_{M_1} \\&\quad \quad \quad +L_{M_1}L_{S_1}U_2- U_2^*L_{S_1} L_{M_1}+U_{33}L_{B_1} -L_{B_1}{U_{33}}^*, \end{aligned}\end{aligned}$$
(2.9)

or

$$\begin{aligned}&Z_1=\frac{1}{2}M_2^\dagger C_2(B_2^\dagger )^*(I+S_2^\dagger S_2)+\frac{1}{2}(I+S_2^\dagger S_2)B_2^\dagger C_2(M_2^\dagger )^*+L_{M_2}U_{11}L_{M_2}\nonumber \\&\quad \qquad +L_{M_2}L_{S_2}U_{22}-U_{22}^*L_{S_2} L_{M_2} +U_3L_{B_2}-L_{B_2}U_3^*, \end{aligned}$$
(2.10)

with

$$\begin{aligned}{} & {} U_{2}^*=[\begin{array}{cccc} I_m&0&0&0 \end{array}]{W},\nonumber \\{} & {} U_{3}^*=[\begin{array}{cccc} 0&I_m&0&0 \end{array}]{W},\nonumber \\{} & {} U_{22}=[\begin{array}{cccc} 0&0&I_m&0 \end{array}]{W},\nonumber \\{} & {} U_{33}=[\begin{array}{cccc} 0&0&0&I_m \end{array}]{W}, \end{aligned}$$
(2.11)
$$\begin{aligned}{} & {} W= A_3^\dagger (E_{11}-L_{M_1}U_1L_{M_1}-L_{M_2}U_{11}L_{M_2})- \frac{1}{2}A_{3}^\dagger (E_{11}-L_{M_1}U_1L_{M_1} \nonumber \\{} & {} ~~~~\quad \quad \quad -L_{M_2}U_{11}L_{M_2}) A_3A_3^\dagger -A_3^\dagger W_1A_3^*+W_1^*A_3A_3^\dagger +L_{A_3}W_5,\nonumber \\{} & {} U_1=-U_1^{*}=A_4^\dagger E_{22}(A_4^\dagger )^*-\frac{1}{2} A_4^\dagger A_5 M_3^\dagger E_{22}(I+(A_5^\dagger )^*S_3^*)(A_4^\dagger )^*\nonumber \\{} & {} \quad \quad \quad -\frac{1}{2} A_4^\dagger (I+S_3A_5^\dagger )E_{22} (M_3^\dagger )^*A_5^*(A_4^\dagger )^*- A_4^\dagger S_3W_6(A_4^\dagger S_3)^*+L_{A_4}W_7-W_7^*L_{A_4},\nonumber \\{} & {} U_{11}=-U^{*}_{11}=\frac{1}{2}M_3^\dagger E_{22}(A_5^\dagger )^*(I+S_3^\dagger S_3)+\frac{1}{2}(I +S_3^\dagger S_3)A_5^\dagger E_{22}(M_3^\dagger )^*+L_{M_3}W_6L_{M_3}\nonumber \\{} & {} \quad \quad \quad \quad +L_{M_3}L_{S_3}W_8-W_8^*L_{S_3}L_{M_3}-W_9L_{A_5}+L_{A_5}W_9^*, \end{aligned}$$
(2.12)

where \(T_1, T_2, T_3\), and \(W_1,~W_5,\cdots ,W_9,~W_6^*=-W_6\) are any matrices of acceptable shapes over  \(\mathbb {C}\).

Proof

By writing the equations in (1.5) as follows:

$$\begin{aligned} D_1X_1-(D_1X_1)^*+E_1Y_1E_1^{*}+F_1 Z_1F_1^{*}=G_1,~G_1^{*}=-G_1 \end{aligned}$$
(2.13)

and

$$\begin{aligned} D_2X_2-(D_2X_2)^*+E_2Y_2E_2^{*}+F_2 Z_1F_2^{*}=G_2,~G_2^{*}=-G_2. \end{aligned}$$
(2.14)

By the support of Lemma 1.3, Eqs. (2.132.14) have solution if and only if

$$\begin{aligned}{} & {} R_{A_1}C_1R_{B_1}^*,=0,~~~R_{M_1}R_{A_1}C_1=0,\\{} & {} R_{A_2}C_2R_{B_2}^*,=0,~~~R_{M_2}R_{A_2}C_2=0,\\{} & {} R_{A_4}E_{22}R_{A_5}^*=0,~~~R_{M_3}R_{A_4}E_{22}=0. \end{aligned}$$

In this case, the general solution to (2.13) and (2.14) can be described as

$$\begin{aligned}{} & {} X_1=D_1^\dagger (G_1-E_1Y_1E_1^{*} -F_1Z_1F_1^{*})-\frac{1}{2}D_1^\dagger (G_1-E_1Y_1E_1^{*} -F_1Z_1F_1^{*})D_1D_1^\dagger \nonumber \\{} & {} ~~~~~~~~~~+D_1^\dagger T_1D_1^*+T_2^*D_1D_1^\dagger -L_{D_1}T_3,\nonumber \\{} & {} Y_1=A_1^\dagger C_1(A_1^\dagger )^*-\frac{1}{2}A_1^\dagger B_1M_1^\dagger C_1[I+(B_1^\dagger )^*S_1^*](A_1^\dagger )^*\nonumber \\{} & {} \quad \qquad -\frac{1}{2}A_1^\dagger [I+S_1 B_1^\dagger ]C_1 (M_1^\dagger ) ^*B_1^{*} (A_1^\dagger )^*- A_1^\dagger S_1U_1S_1^*(A_1^\dagger )^*-L_{A_1} V_1+V_1^*L_{A_1},\nonumber \\{} & {} Z_1=\frac{1}{2}M_1^\dagger C_1(B_1^\dagger )^*(I+S_1^\dagger S_1)+\frac{1}{2}(I+S_1^\dagger S_1)B_1^\dagger C_1 (M_1^\dagger )^*\nonumber \\{} & {} \quad \qquad +L_{M_1}U_1L_{M_1}{+}L_{M_1}L_{S_1}U_2{-} U_2^*L_{S_1} L_{M_1}+U_{33}L_{B_1} -L_{B_1}U_{33}^*, \end{aligned}$$
(2.15)
$$\begin{aligned}{} & {} X_2=D_2^\dagger (G_2-E_2Y_2E_2^{*} -F_2Z_1F_2^{*})-\frac{1}{2}D_2^\dagger (G_2-E_2Y_2E_2^{*} -F_2Z_1F_2^{*})D_2D_2^\dagger \nonumber \\{} & {} \qquad \quad +D_2^\dagger T_{11}D_2^*+T_{22}^*D_2D_2^\dagger -L_{D_2}T_{33},\nonumber \\{} & {} Y_2=A_2^\dagger C_2(A_2^\dagger )^*- \frac{1}{2}A_2^\dagger B_2M_2^\dagger C_2[I+(B_2^\dagger )^*S_2^*](A_2^\dagger )^*\nonumber \\{} & {} \quad \qquad {-}\frac{1}{2}A_2^\dagger [I+S_2B_2^\dagger ]C_2 (M_2^\dagger )^*B_2^{*} (A_2^\dagger )^*{-}A_2^\dagger S_2U_{11}S_2^*(A_2^\dagger )^*-L_{A_2}V_{11}+V_{11}^*L_{A_{2}},\nonumber \\{} & {} Z_1=\frac{1}{2}M_2^\dagger C_2(B_2^\dagger )^*(I+S_2^\dagger S_2)+\frac{1}{2}(I +S_2^\dagger S_2)B_2^\dagger C_2(M_2^\dagger )^*\nonumber \\{} & {} \qquad \quad +L_{M_2}U_{11}L_{M_2}{+}L_{M_2}L_{S_2}U_{22} {-}U_{22}^*L_{S_2} L_{M_2}{+}U_3L_{B_2}{-}L_{B_2}U_3^*, \end{aligned}$$
(2.16)

where \(V_1,~U_1^*=-U_1,~U_2,~U_3,~U_{11}^*=-U_{11},~U_{22},~U_{33}\) and \(T_1, T_2, T_3\) are free matrices of plausible sizes over \(\mathbb {C}\).

Equating (2.15) and (2.16), we get

$$\begin{aligned} A_3W-(A_3W)^*+L_{M_1}U_1L_{M_1}+L_{M_2}U_{11}L_{M_2}=E_{11}. \end{aligned}$$
(2.17)

Solving Eq. (2.17) with respect to unknowns W, \(U_1\), and \(U_{11}\) by Lemma 1.3, we have that it has a solution (2.12) if and only if (2.2) is satisfied. In this case, its general solution can be expressed by (2.92.10).\((2)\Leftrightarrow (3):\) From Lemma 1.3, we have

$$\begin{aligned}{} & {} R_{A_1}C_1R_{B_1}^*=0\Leftrightarrow r\left[ \begin{array}{cc} C_1 &{} A_1 \\ B_1^*&{} 0 \\ \end{array}\right] =r(A_1)+r(B_1),\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{cc} R_{D_1}G_1R_{D_1}^*&{} R_{D_1}E_1 \\ F_1^*R_{D_1}^*&{} 0 \\ \end{array} \right] =r(R_{D_1}E_1)+r(R_{D_1}F_1)\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccc} G_1 &{} E_1 &{} D_1 \\ F_1^*&{} 0 &{} 0 \\ D_1^*&{} 0 &{} 0 \\ \end{array} \right] =r[D_1~~~E_1]+r[D_1~~~F_1],\\{} & {} R_{M_1}R_{A_1}C_1=0\Leftrightarrow r\left[ \begin{array}{cc} R_{A_1}C_1 &{} M_1 \\ \end{array} \right] =r(M_1)\Leftrightarrow r\left[ \begin{array}{cc} R_{A_1}C_1 &{} R_{A_1}B_1 \\ \end{array} \right] =r(R_{A_1}B_1)\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccc} C_1 &{} B_1 &{} A_1 \\ \end{array} \right] =r\left[ \begin{array}{cc} A_1 &{} B_1 \\ \end{array} \right] \\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccc} R_{D_1}G_1R_{D_1}^*&{} R_{D_1}E_1&{}R_{D_1}F_1 \\ \end{array} \right] =r[R_{D_1}E_1~~~R_{D_1}F_1]\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{cccc} G_1 &{} E_1&{}F_1 &{} D_1 \\ D_1^*&{} 0&{}0 &{} 0 \\ \end{array} \right] =r[D_1~~~E_1~~~F_1]+r(D_1),\\{} & {} R_{A_2}C_2R_{B_2}^*=0\Leftrightarrow r\left[ \begin{array}{cc} C_2&{} A_2 \\ B_2^*&{} 0 \\ \end{array} \right] =r(A_2)+r(B_2)\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{cc} R_{D_2}G_2R_{D_2}^*&{} R_{D_2}E_2 \\ F_2^*R_{D_2}^*&{} 0 \\ \end{array} \right] =r(R_{D_2}E_2)+r(R_{D_2}F_2)\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccc} G_2 &{} E_2 &{} D_2 \\ F_2^*&{} 0 &{} 0 \\ D_2^*&{} 0 &{} 0 \\ \end{array} \right] =r[D_2~~~E_2]+r[D_2~~~F_2],\\{} & {} R_{M_2}R_{A_2}C_2=0\Leftrightarrow r\left[ \begin{array}{cc} R_{A_2}C_2 &{} M_2 \\ \end{array}\right] =r(M_2)\Leftrightarrow r\left[ \begin{array}{cc} R_{A_2}C_2 &{} R_{A_2}B_2 \\ \end{array} \right] =r(R_{A_2}B_2)\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccc} C_2 &{} B_2 &{} A_2 \\ \end{array} \right] =r\left[ \begin{array}{cc} A_2 &{} B_2 \\ \end{array} \right] \\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccc} R_{D_2}G_2R_{D_2}^*&{} R_{D_2}E_2&{}R_{D_2}F_2 \\ \end{array} \right] =r[R_{D_2}E_2~~~R_{D_2}F_2]\\ \Leftrightarrow{} & {} r\left[ \begin{array}{cccc} G_2 &{} E_2&{}F_2 &{} D_2 \\ D_2^*&{} 0&{}0 &{} 0 \\ \end{array} \right] =r[D_2~~~E_2~~~F_2]+r(D_2),\\{} & {} R_{A_4}E_{22}R_{A_5}=0\Leftrightarrow r(R_{A_4}E_{22}R_{A_5})=0\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{cc} E_{22} &{} A_4 \\ A_5^*&{} 0 \\ \end{array} \right] =r(A_4)+r(A_5)\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{cc} R_{A_3}E_{11}R_{A_3} &{} R_{A_3}L_{M_1} \\ L_{M_2}R_{A_3}^*&{} 0 \\ \end{array} \right] =r(R_{A_3}L_{M_1})+r[(R_{A_3}L_{M_2})^*]\\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccc} E_{11} &{} L_{M_1} &{} A_{3} \\ L_{M_2} &{} 0&{} 0 \\ A_3^*&{} 0 &{} 0 \\ \end{array} \right] =r\left[ \begin{array}{cc} L_{M_1} &{} A_3 \\ \end{array} \right] +r\left[ \begin{array}{cc} L_{M_2}&{}A_3\\ \end{array} \right] \end{aligned}$$
$$\begin{aligned}{} & {} \quad \Leftrightarrow r\left[ \begin{array}{cccccc} Z_{02}-Z_{01} &{} L_{M_1}&{} L_{M_1}L_{S_1} &{} L_{B_1} &{}- L_{M_2}L_{S_2}&{} -L_{B_2} \\ L_{M_2}&{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ L_{S_1}L_{M_1} &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ L_{B_1} &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ -L_{S_2}L_{M_2}&{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ -L_{B_2} &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ \end{array} \right] \\={} & {} r\left[ \begin{array}{ccccc} L_{M_1} &{} L_{B_1} &{}- L_{B_2} &{} L_{M_1}L_{S_1} &{} -L_{M_2}L_{S_2} \\ \end{array} \right] +r\left[ \begin{array}{ccccc} L_{M_2}&{}L_{M_1}L_{S_1} &{}L_{B_1}&{}-L_{M_2}L_{S_2}&{}-L_{B_2}\\ \end{array} \right] \\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccccc} Z_{02}-Z_{01} &{} L_{M_1} &{} L_{B_1} &{} -L_{M_2}L_{S_2}&{} -L_{B_2} \\ L_{M_2}&{} 0 &{} 0 &{} 0 &{} 0 \\ L_{S_1}L_{M_1} &{} 0 &{} 0 &{} 0 &{} 0 \\ L_{B_1} &{} 0 &{} 0 &{} 0 &{} 0 \\ -L_{B_2}&{} 0 &{} 0 &{} 0 &{} 0 \\ \end{array} \right] \\={} & {} r\left[ \begin{array}{cccc} L_{M_1} &{} L_{B_1} &{} -L_{M_2}L_{S_2}&{}- L_{B_2} \\ \end{array} \right] +r\left[ \begin{array}{cccc} L_{M_2} &{}L_{M_1}L_{S_1}&{}L_{B_1}&{}- L_{B_2}\\ \end{array} \right] \\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{ccccccccc} Z_{02}-Z_{01} &{} I &{} I &{} -L_{M_2}&{} -I &{} 0 &{} 0 &{} 0 &{} 0 \\ I &{} 0 &{} 0 &{} 0 &{} 0 &{} B_2^*L_{{A_2}^*} &{} 0 &{} 0&{} 0 \\ L_{M_1} &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} S_1^*&{} 0 &{} 0 \\ I &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} B_1^*&{} 0 \\ -I&{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0&{} B_2^*\\ 0 &{} R_{A_1}B_1&{} 0 &{} 0 &{} 0 &{} 0&{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} B_1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} B_2L_{M_2} &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0&{} 0 &{} 0 &{} B_2 &{} 0 &{} 0 &{} 0 &{} 0 \\ \end{array} \right] \\{} & {} \quad = r\left[ \begin{array}{cccc} I&{} I &{} -L_{M_2}&{}-I \\ M_1 &{} 0 &{} 0 &{} 0 \\ 0 &{} B_1 &{} 0 &{} 0 \\ 0 &{} 0 &{} B_2L_{M_2} &{} 0 \\ 0 &{} 0 &{} 0 &{}B_2\\ \end{array} \right] +r\left[ \begin{array}{cccc} I &{} L_{M_1} &{} I &{} -I \\ M_2&{} 0 &{} 0 &{}0 \\ 0&{} B_1 L_{M_1}&{} 0 &{} 0 \\ 0&{} 0 &{} 0 &{} B_2 \\ \end{array} \right] \\{} & {} \quad \Leftrightarrow r\left[ \begin{array}{cccccccccc} Z_{02}-Z_{01} &{} I &{} I &{} -L_{M_2} &{} -I &{} 0 &{} 0 &{} 0 &{} 0&{}0 \\ I &{} 0 &{} 0 &{} 0 &{} 0 &{} B_2^*L_{{A_2}^*} &{} 0 &{} 0&{} 0 &{}0\\ L_{M_1} &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{}L_{M_1} B_1^*&{} 0 &{} 0 &{}0\\ I &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} B_1^*&{} 0 &{}0\\ -I &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0&{}B_2^*&{}0\\ 0 &{} B_1&{} 0 &{} 0 &{} 0 &{} 0&{} 0 &{} 0 &{} 0&{}A_1 \\ 0 &{} 0 &{} B_1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0&{}0 \\ 0 &{} 0 &{} 0 &{} B_2L_{M_2} &{} 0 &{} 0 &{} 0 &{} 0 &{} 0&{}0 \\ 0 &{} 0&{} 0 &{} 0 &{} B_2 &{} 0 &{} 0 &{} 0 &{} 0&{}0 \\ 0 &{} 0&{} 0 &{} 0 &{}B_2&{} 0 &{} 0 &{} 0 &{} 0&{}0\\ \end{array} \right] \\{} & {} \quad = r\left[ \begin{array}{cccc} I&{} I &{} -L_{M_2} &{} -I \\ R_{A_1}B_1 &{} 0 &{} 0 &{} 0 \\ 0 &{} B_1 &{} 0 &{} 0 \\ 0 &{} 0 &{} B_2L_{M_2} &{} 0 \\ 0 &{} 0 &{} 0 &{}B_2\\ \end{array} \right] +r\left[ \begin{array}{cccc} I &{} L_{M_1} &{} I &{} -I \\ R_{A_2}B_2 &{} 0 &{}0&{}0\\ 0&{} B_1L_{M_1}&{} 0 &{}0\\ 0 &{} 0 &{}B_1 &{}0 \\ 0&{}0&{}0&{}B_2\\ \end{array} \right] \end{aligned}$$
$$\begin{aligned}{} & {} \Leftrightarrow r\left[ \begin{array}{ccccccccccccc} Z_{02}-Z_{01} &{} I &{} I &{} -I &{} -I &{} 0 &{} 0 &{} 0 &{} 0&{}0&{}0&{}0&{}0 \\ I &{} 0 &{} 0 &{} 0 &{} 0 &{} B_2^*&{} 0 &{} 0&{} 0 &{}0&{}0&{}0&{}0\\ I &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} B_1^*&{} 0 &{} 0 &{}0&{}M_1^*&{}0&{}0\\ I &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} B_1^*&{} 0 &{}0&{}0&{}0&{}0\\ -I &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0&{} B_2^*&{}0&{}0&{}0&{}0\\ 0 &{} B_1&{} 0 &{} 0 &{} 0 &{} 0&{} 0 &{} 0 &{} 0&{}B_1&{}0&{}A_1&{}0 \\ 0 &{} 0 &{} B_1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0&{}0&{}0&{}0&{}0 \\ 0 &{} 0 &{} 0 &{} B_2 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0&{}0 &{}0&{}0&{}0\\ 0 &{} 0&{} 0 &{} 0 &{} B_2 &{} 0 &{} 0 &{} 0 &{} 0&{}0&{}0&{}0&{}0 \\ 0 &{} 0&{} 0 &{} 0 &{}0&{} {A_2}^*&{} 0 &{} 0 &{} 0&{}0&{}0&{}0&{}0\\ \end{array} \right] \end{aligned}$$
$$\begin{aligned}{} & {} = r\left[ \begin{array}{ccccc} I&{} I &{} -I &{} -I &{}0\\ B_1&{} 0 &{} 0 &{} 0 &{}{A_1}\\ 0 &{} B_1 &{} 0 &{} 0&{}0 \\ 0 &{} 0 &{} B_2 &{} 0&{}0 \\ 0 &{} 0 &{} 0 &{}B_2&{}0\\ \end{array} \right] +r\left[ \begin{array}{ccccc} I &{} I &{} I &{} -I&{} 0 \\ B_2 &{} 0&{} 0 &{}0&{}A_2 \\ 0&{} B_1&{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{}B_1&{} 0 &{} 0 \\ 0&{}0&{}0&{}B_2&{}0\\ \end{array} \right] \\{} & {} \Leftrightarrow r\left[ \begin{array}{ccccccc} 0&{} -B_2^*&{} 0&{} 0 &{} B_2^*&{}0&{}0\\ 0 &{} 0 &{} B_1^*&{} 0 &{} B_2^*&{} 0&{}0 \\ 0 &{} 0&{}0 &{} B_1^*&{} B_2^*&{}0&{}0 \\ 0 &{} 0 &{}-C_1&{} 0 &{} 0&{}B_1&{}A_1 \\ B_2 &{} -C_2 &{} 0 &{} 0 &{} 0&{}0&{}0 \\ 0&{} A_2^*&{} 0 &{} 0 &{} 0 &{}0&{}0\\ \end{array} \right] \\{} & {} = r\left[ \begin{array}{cccc} B_1 &{} 0&{}0 &{} A_1 \\ 0&{}B_1 &{} 0 &{} 0 \\ 0 &{} B_2 &{}-B_2&{} 0 \\ B_2&{}0&{}B_2&{}0\\ \end{array} \right] +r\left[ \begin{array}{ccc} B_2 &{} B_2 &{} -A_2 \\ B_1 &{} 0 &{}0 \\ 0 &{} B_1 &{} 0 \\ \end{array} \right] \Leftrightarrow (2.7). \end{aligned}$$

On the same lines, \(R_{M_3}R_{A_4}E_{22}=0\) can be proved to be same as (2.8).

Hence, the theorem is finished. \(\square \)

Comment 2.2

The application of extremal rank in the area of control theory can be viewed in [8,9,10]. We may carry out the extremal rank of the general solution of the system (1.5).

Now, we discuss some particular cases of our system.

Using Theorem 2.1, the general solution and the solvability conditions to (1.4) can be obtained as follows.

Corollary 2.3

Let \(A_1\in \mathbb {C}^{m\times n}\), \(A_2\in \mathbb {C}^{m\times q}\), \(B_i\in \mathbb {C}^{m\times k}\), and \(C_i={-}C_i^*\in \mathbb {C}^{m\times m}\) for \(i=1,2\). Assign

$$\begin{aligned}{} & {} M_1=R_{A_1}B_1,~S_1=B_1L_{M_1},~M_2=R_{A_2}B_2,~S_2=B_2L_{M_2},~A_4=R_{A_3}L_{M_1},~B_4=R_{A_3}L_{M_2},\\{} & {} A_3=\begin{bmatrix} L_{B_2}^*&{} -L_{B_1} &{} L_{M_1}L_{S_1}&{}- L_{M_2}L_{S_2} \\ \end{bmatrix},~M_3=R_{A_4}B_4,~S_3=B_4L_{M_3},\\{} & {} C_{3}=V_{02}-V_{01},~V_{02}=\frac{1}{2}M_2^\dagger C_2(B_2^\dagger )^*(I+S_2^\dagger S_2){+}\frac{1}{2}(I+S_2^\dagger S_2)B_2^\dagger C_2(M_2^\dagger )^*,\\{} & {} V_{01}=\frac{1}{2}M_1^\dagger C_1(B_1^\dagger )^*(I+S_1^\dagger S_1){+}\frac{1}{2} (I+S_1^\dagger S_1)B_1^\dagger C_1 (M_1^\dagger )^*,~C_4=R_{A_{3}}C_{3}R_{A_{3}}. \end{aligned}$$

Then, the following conditions are equivalent:

  1. (1)

    System (1.4) is consistent.

  2. (2)

    The following equalities hold:

    $$\begin{aligned}{} & {} R_{A_1}C_1R_{B_1}=0,~~R_{M_1}R_{A_1}C_1=0,\\{} & {} R_{A_2}C_2R_{B_2}=0,~~R_{M_2}R_{A_2}C_2=0,\\{} & {} R_{A_4}C_4R_{B_4}=0,~~R_{M_3}R_{A_4}C_4=0. \end{aligned}$$
  3. (3)

    The following rank equalities hold:

    $$\begin{aligned}{} & {} r\begin{bmatrix} C_1 &{} A_1 \\ B_1^{*} &{} 0 \\ \end{bmatrix}=r(A_1)+r(B_1),~~~~ r\begin{bmatrix} C_1 &{}B_1 &{} A_1 \\ \end{bmatrix}=r\begin{bmatrix} A_1 &{} B_1 \\ \end{bmatrix},\\{} & {} r\begin{bmatrix} C_2 &{} A_2 \\ B_2^{*} &{} 0 \\ \end{bmatrix}=r(A_2)+r(B_2),~~~~ r \begin{bmatrix} C_2 &{}B_2 &{} A_2 \\ \end{bmatrix}=r \begin{bmatrix} A_2 &{} B_2 \\ \end{bmatrix},\\ \Leftrightarrow{} & {} r \begin{bmatrix} 0 &{} 0&{} 0&{}B_2^*&{} B_1&{} 0 &{}0\\ 0 &{} 0&{}0 &{} -B_2^*&{} 0 &{} B_1^*&{} 0 \\ B_1 &{} 0 &{} 0 &{} 0 &{}0&{} C_1 &{} A_1 \\ 0&{}B_2 &{} 0 &{} -C_2 &{} 0 &{} 0&{}0 \\ -B_2 &{}-B_2 &{} B_2 &{} 0 &{} 0 &{} 0&{}0 \\ 0&{}0 &{} 0&{} A_2^*&{} 0 &{} 0 &{} 0 \\ \end{bmatrix}\\ ={} & {} r \begin{bmatrix} -B_1 &{}0&{} -B_1 &{} A_1 \\ B_2&{}B_2 &{} 0 &{} 0 \\ 0 &{} B_1 &{} 0&{}0 \\ 0&{}0&{}B_2&{}0\\ \end{bmatrix}+r\begin{bmatrix} B_2 &{} 0 &{} 0&{}A_2 \\ -B_2 &{} B_2 &{}- B_2&{}0 \\ 0&{}B_1&{} 0 &{} 0 \\ 0&{}0&{}B_1&{}0\\ \end{bmatrix},\\{} & {} r \begin{bmatrix} 0 &{} 0 &{} -B_1^*&{} B_2^*&{} 0 &{} 0&{} 0 &{} 0 \\ 0 &{} 0 &{} -B_1^*&{} 0 &{} B_1^*&{} 0&{} 0 &{} 0 \\ 0 &{} 0 &{} -B_1^*&{} 0 &{} 0 &{} B_2^*&{} 0 &{} 0\\ -B_1^*&{}- B_1^*&{} 0 &{} 0 &{}- C_1 &{} 0&{} A_1 &{} 0 \\ B_2 &{} 0 &{} 0 &{} 0 &{} 0 &{} C_2&{} A_2 &{} 0 \\ 0 &{} B_2 &{} 0 &{} 0 &{} 0 &{} 0&{} 0 &{} 0 \\ \end{bmatrix}\\ ={} & {} r \begin{bmatrix} -B_1 &{}0 &{}-B_1 &{} A_1 \\ B_2&{}B_2 &{} 0&{}0 \\ 0 &{} B_1 &{} 0 &{}0\\ 0&{}0&{}B_2&{}0\\ \end{bmatrix}+r \begin{bmatrix} B_2 &{} 0 \\ B_1 &{} 0 \\ 0 &{} B_2 \\ \end{bmatrix}+r(B_1). \end{aligned}$$

Under these conditions, the general solution to (1.4) is

$$\begin{aligned} U= & {} A_1^\dagger C_1(A_1^\dagger )^*-\frac{1}{2}A_1^\dagger B_1M_1^\dagger C_1[I+(B_1^\dagger )^*S_1^*](A_1^\dagger )^*\\{} & {} {-}\frac{1}{2}A_1^\dagger [I+S_1 B_1^\dagger ]C_1 (M_1^\dagger )^*B_1^{*} (A_1^\dagger )^*-A_1^\dagger S_1U_1S_1^*(A_1^\dagger )^*+L_{A_1}V_1-V_1^*L_{A_1},\\ W= & {} - W^*= A_2^\dagger C_2(A_2^\dagger )^*-\frac{1}{2}A_2^\dagger B_2M_2^\dagger C_2[I+(B_2^\dagger )^*S_2^*](A_2^\dagger )^*\\{} & {} {-}\frac{1}{2}A_2^\dagger [I+S_2B_2^\dagger ]C_2 (M_2^\dagger )^*B_2^{*} (A_2^\dagger )^*-A_2^\dagger S_2U_{4}S_2^*(A_2^\dagger )^*+L_{A_2}V_{2}-V_{2}^*L_{A_{2}},\\ V= & {} -V^*=\frac{1}{2}M_1^\dagger C_1(B_1^\dagger )^*(I+S_1^\dagger S_1){+} \frac{1}{2}(I+S_1^\dagger S_1)B_1^\dagger C_1 (M_1^\dagger )^*\\{} & {} \quad +L_{M_1}U_1L_{M_1}+L_{M_1}L_{S_1}U_2-U_2^*L_{S_1} L_{M_1}+U_3L_{B_1}-L_{B_1}U_3^*, \end{aligned}$$

or

$$\begin{aligned} V= & {} -V^*=\frac{1}{2}M_2^\dagger C_2(B_2^\dagger )^*(I+S_2^\dagger S_2){+}\frac{1}{2}(I+S_2^\dagger S_2)B_2^\dagger C_2(M_2^\dagger )^*\\{} & {} +L_{M_2}U_{4}L_{M_2}+L_{M_2}L_{S_2}U_{5}{-}U_{5}^*L_{S_2} L_{M_2}+U_{6}L_{B_2}-L_{B_2}U_{6}^*, \end{aligned}$$

with

$$\begin{aligned}{} & {} U_{6}^*=[\begin{array}{cccc} I_k&0&0&0 \end{array}]{Z},\\{} & {} U_{3}^*=[\begin{array}{cccc} 0&I_k&0&0 \end{array}]{Z},\\{} & {} U_{2}=[\begin{array}{cccc} 0&0&I_k&0 \end{array}]{Z},\\{} & {} U_{5}=[\begin{array}{cccc} 0&0&0&I_k \end{array}]{Z}, \end{aligned}$$

where

$$\begin{aligned} {Z}= & {} A_3^\dagger (C_3-L_{M_1}U_1L_{M_1}-L_{M_2}U_{4}L_{M_2})-\frac{1}{2}A_{3}^\dagger (C_3-L_{M_1}U_1L_{M_1}-L_{M_2}U_{4}L_{M_2}) A_3A_3^\dagger \\{} & {} ~~~~~ -A_3^\dagger U_7A_3^*-U_7^*A_3A_3^\dagger +L_{A_3}U_8, \\ U_1= & {} -U_1^{*}=A_4^\dagger C_{4}(A_4^\dagger )^*-\frac{1}{2} A_4^\dagger B_4 M_3^\dagger C_{4}(I+(B_4^\dagger )^*S_3^*)(A_4^\dagger )^*\\{} & {} ~~~~~{-}\frac{1}{2} A_4^\dagger (I+S_3B_4^\dagger )C_{4} (M_3^\dagger )^*B_4^*(A_4^\dagger )^*-A_4^\dagger S_3U_9(A_4^\dagger S_3)^*+L_{A_4}U_{10}-U_{10}^*L_{A_4},\\ U_{4}= & {} -U_{4}^*=\frac{1}{2}M_3^\dagger C_{4}(B_4^\dagger )^*(I+S_3^\dagger S_3){+}\frac{1}{2}(I+S_3^\dagger S_3)B_4^\dagger C_{4}(M_3^\dagger )^*+L_{M_3}U_{11}L_{M_3}\\{} & {} ~~~~~+L_{M_3}L_{S_3}U_{12}-U_{12}^*L_{S_3}L_{M_3}+U_{13}L_{B_4}-L_{B_4}U_{13}^*, \end{aligned}$$

where  \(V_1,~V_{2},~U_7,\ldots , U_{13},\) \(U_9={-U}_9^*\), \(U_{11}={-}U_{11}^*\) are any matrices of acceptable shapes over \(\mathbb {C}\).

3 Algorithm with example

In this section, we construct the algorithm for finding solutions to (1.5) that is inducted by Theorem 2.1.

Algorithm 3.1

  1. (1)

    Feed the values of \(D_i,~E_i,~F_i,~G_i,~(i=1,2)\) with conformable shapes over \(\mathbb {C}\).

  2. (2)

    Compute the matrices determined by (2.1).

  3. (3)

    Verify the consistence equalities expressed by matrix equations (2.2) or rank equalities (2.3)-(2.8). If no, then return “inconsistent".

  4. (4)

    If the consistence equalities are true, then we compute auxiliary matrices \(U_1\), \(U_{11}\), and W by (2.12), and \(U_2\), \(U_3\), \(U_{22}\), and \(U_{3}\) by (2.11).

  5. (5)

    Finally, we find the solution \(X_i,~Y_i, (i=1,2)\) and \(Z_1\) by (2.9), or another formula for \(Z_1\) is (2.10).

Using Algorithm 3.1, we consider the following example. Note that our goal is both to confirm correctness of main results from Theorem 2.1 and to demonstrate the technique of applying the determinantal representations of the MP-inverse from Lemma 1.4.

Example 3.2

Given the matrices:

$$\begin{aligned}&E_1= \begin{bmatrix} 4i&{} 4-4i &{} 4&{}4+4i \\ -4 &{} 4+4i &{} 4i&{}4i-4 \\ 4i-4 &{} 8 &{} 4i+4&{}8i\\ 8 &{} -8i-8 &{} -8i&{}8-8i \end{bmatrix},~F_1= \begin{bmatrix} 4+8i&{}8+4i &{} -8+4i \\ -8+4i&{}8i-4 &{} -4-8i \\ -4+12i&{}12i+4 &{} -12-4i \\ -8-16i&{}-16-8i &{} 16-8i \\ \end{bmatrix}, \end{aligned}$$
(3.1)
$$\begin{aligned}&D_1= \begin{bmatrix} 1+i&{}-1+i\\ -1+i &{}-1-i\\ 1-i&{}1+i\\ -1-i&{}1-i \end{bmatrix}, G_1= 92160 \begin{bmatrix}i&{} 1&{} 1+i &{} -2\\ -1 &{} i&{} -1+i&{} -2i\\ -1+i&{} 1+i &{} 2i &{}-2-2i\\ 2 &{} -2i &{} 2-2i &{}4i \end{bmatrix}, \end{aligned}$$
(3.2)
$$\begin{aligned}&E_2= \begin{bmatrix} -i+1&{}-1+i\\ 1+i&{}-i-1\\ 3+i&{}-3-i\\ 2+2i&{}-2i-2 \end{bmatrix},~F_2= \begin{bmatrix} 3i&{}-3&{}3+3i\\ 3&{}3i&{}3-3i\\ -6i&{} 6&{}-6i-6\\ -6&{}-6i&{}-6+6i \end{bmatrix}, \end{aligned}$$
(3.3)
$$\begin{aligned}&D_2=\begin{bmatrix} 2+i&{} 2-i&{} -1+2i\\ -1+2i&{} 2i+1&{} -2-i\\ 1+3i&{} 3+i&{} -3+i\\ 3-i&{} 1-3i&{} 1+3i\end{bmatrix}, G_2=96 \begin{bmatrix} i&{}1&{}2+i&{}2\\ -1&{}i&{}-1+2i&{}2i\\ -2+i&{}1+2i&{}5i&{}2+4i\\ -2&{}2i&{}-2+4i&{}4i \end{bmatrix}. \end{aligned}$$
(3.4)
  1. 1.

    Thanks to Lemma 1.4, we calculate the Moore–Penrose inverses of given matrices and using them for compute all needed matrices from (2.1). For example

    $$\begin{aligned}{} & {} D_1^{\dag }=\frac{1}{16} \begin{bmatrix} 1-i&{} -1-i &{} 1+i&{}-1+i \\ -i-1&{}-1+i&{}-i+1&{}1+i \end{bmatrix}, ~A_1= \begin{bmatrix} 3+3i&{}-6i&{}3-3i&{}6]\\ -3+3i&{}6&{}3+3i&{}6i\\ -5+i&{}6+4i&{}1+5i&{}-4+6i\\ 5+i&{}-6i-4&{}1-5i&{}6-4i \end{bmatrix},\\{} & {} B_1= \begin{bmatrix} 3+i&{}3-i&{}-1+3i\\ -1+3i&{}1+3i&{}-3-i\\ -11+13i&{}-1+17i&{}-13-11i\\ -7-9i&{}-11-3i&{}9-7i \end{bmatrix},~D_2^{\dag }=\frac{1}{90} \begin{bmatrix} 2-i&{}-1-2i&{}1-3i&{}3+i\\ 2+i&{}1-2i&{}3-i&{}1+3i\\ -1-2i&{}-2+i&{}-3-i&{}1-3i \end{bmatrix}\\{} & {} A_2= \begin{bmatrix} -i&{}i\\ 1&{}-1\\ 2&{}-2\\ 1+3i&{}-3i-1 \end{bmatrix}, ~B_2^{\dag }= \begin{bmatrix} 5i+2&{}-5+2i&{}7+3i\\ 2i+1&{}-2+i&{}3+i\\ -2i&{}2&{}-2i-2\\ -2&{}-2i&{}-2+2i\end{bmatrix},\\{} & {} {M_1}=\frac{1}{11} \begin{bmatrix} -24+32i&{}40i&{}-32-24i\\ -32-24i&{}-40&{}24-32i\\ -104+72i&{}-40+120i&{}-72-104i\\ -120-40i&{}-120+40i&{}40-120i \end{bmatrix}, L_{M_1}=\frac{1}{15} \begin{bmatrix} 10&{}4+3i&{}-5i\\ -4-3i&{}10&{}3-4i\\ 5i&{}3+4i&{}10 \end{bmatrix},\\{} & {} {M_2}=\frac{1}{8} \begin{bmatrix} 13+37i&{}-37+13i&{}50+24i\\ 11+13i&{}-13+11i&{}24+2i\\ 8-22i&{}22+6i&{}-16-28i\\ -4+6i&{}-6-4i&{}2+10i \end{bmatrix}, ~L_{M_2}=\frac{1}{4} \begin{bmatrix} 3&{}-i&{}-1+i\\ i&{}3&{}1+i\\ -1-i&{}1-i&{}2 \end{bmatrix}, \end{aligned}$$

    etc. In particular, we obtain \(S_1\), \(S_2\), \(A_4\), \(A_5\), and \(E_{11}\), are zero matrices.

  2. 2.

    Confirm that (2.2) are true for given matrices.

  3. 3.

    To avoid a trivial singular case, we put

    $$\begin{aligned}{} & {} W_6= \begin{bmatrix} 4i&{}4&{}-4i\\ -4&{}8i&{}-4\\ -4i&{}4&{}4i \end{bmatrix}, ~~W_7= \begin{bmatrix} i&{}i&{}2\\ i&{}1&{}i\\ 1&{}i&{}i \end{bmatrix}, V_{11}= \begin{bmatrix} 1+i&{} -1+2i\\ -i-1&{} 2-i \end{bmatrix},\\{} & {} V_{1}= \begin{bmatrix} 1+i&{}-1+i&{}-2+i&{}2+qi\\ -1+i&{}-i-1&{}-1-2i&{}-1+2i\\ 2i&{}-2&{}-3-i&{}1+3i\\ 2&{}2i&{}-1+3i&{}3-qi \end{bmatrix}, T_{3}= \begin{bmatrix} 1+i&{}-1+i&{}-3+i&{}3+qi\\ -1+i&{}-i-1&{}-1-3i&{}-1+3i\\ \end{bmatrix}.\end{aligned}$$
  4. 4.

    Finally, we have

    $$\begin{aligned} Z_1= & {} \frac{1}{1200} \begin{bmatrix} 2700i&{}1916-312i&{}3345-1315i\\ -1916-312i&{}2700i&{}1257+3299i\\ -3345-1315i&{}-1257+3299i&{}5460i \end{bmatrix}, Y_2=\frac{1}{2} \begin{bmatrix} 24i&{}1-23i\\ -1-23i&{}26i \end{bmatrix},\\ Y_1= & {} \frac{1}{6} \begin{bmatrix} 974i&{}953-963i&{}951&{}958+965i\\ -953-963i&{}1920i&{}-952+960i&{}-1927+i\\ -951&{}952+960i&{}952i&{}-966+977i\\ -958+965i&{}1927+i&{}966+977i&{}1898i \end{bmatrix},\\ X_1= & {} \begin{bmatrix} 1+i&{}-1+i&{}-3+i&{}3+qi\\ -1+i&{}-i-1&{}-1-3i&{}-1+3i\\ \end{bmatrix},\\ X_2= & {} \frac{1}{2250} \begin{bmatrix} 33497+20254i&{}20254+13243i&{}-39729-13243i&{}13243-39729i\\ 3895+38950i&{}1558+24149i&{}-13243-39729i&{}39729i-13243i\\ \end{bmatrix}. \end{aligned}$$

Note that Maple 2021 was used to perform the numerical experiment.

4 Conclusion

The compact form of formula for the general solution of system of skew-Hermitian generalized Sylvester matrix equations (1.5) is established in this paper when this system obeys some solvable conditions over a complex number field \(\mathbb {C}\). The Moore–Penrose inverse and the rank equalities of the coefficient matrices are used to obtain our main result. A particular case of this system is also discussed. We provide an algorithm and a numerical example to compute the general solution to (1.5) based on determinantal representations of generalized inverses.