# Least Squares Pure Imaginary Solution and Real Solution of the Quaternion Matrix EquationA

Authors: Shi-Fang Yuan
Journal: Journal of Applied Mathematics
 (2014)

---

## Abstract

Using the Kronecker product of matrices, the Moore-Penrose generalized inverse, and the complex representation of quaternion matrices, we derive the expressions of least squares solution with the least norm, least squares pure imaginary solution with the least norm, and least squares real solution with the least norm of the quaternion matrix equationA
X
B
+
C
X
D
=
E, respectively.


---

## Body

## 1. Introduction

Quaternions were introduced by Irish mathematician Sir William Rowan Hamilton in 1843. The family of quaternions is a skew field or noncommutative division algebra, since the characteristic property of quaternions is their noncommutativity under multiplication. A quaternionq can be uniquely expressed as q
=
q
0
+
q
1
i
+
q
2
j
+
q
3
k with real coefficients q
0, q
1, q
2, q
3, i
2
=
j
2
=
k
2
=
-
1, i
j
=
-
j
i
=
k, and q can be uniquely expressed as q
=
c
1
+
c
2
j, where c
1 and c
2 are complex numbers. Thus, every pure imaginary quaternion q
′ can be uniquely expressed as q
′
=
q
1
′
i
+
q
2
′
j
+
q
3
′
k.Throughout this paper, letQ, R
m
×
n,  C
m
×
n, Q
m
×
n, and I
Q
m
×
n be the skew field of quaternions, the set of all m
×
n real matrices, the set of all m
×
n complex matrices, the set of all m
×
n quaternion matrices, and the set of all m
×
n pure imaginary quaternion matrices, respectively. For A
∈
C
m
×
n, Re
(
A
) and Im
⁡
(
A
) denote the real part and the imaginary part of matrix A, respectively. For A
∈
Q
m
×
n, A
¯, A
T, A
H, and A
+ denote the conjugate matrix, the transpose matrix, the conjugate transpose matrix, and the Moore-Penrose generalized inverse matrix of matrix A, respectively.For anyA
∈
Q
m
×
n,  A can be uniquely expressed as A
=
A
1
+
A
2
j, where A
1
,
A
2
∈
C
m
×
n. The complex representation matrix of A
=
A
1
+
A
2
j
∈
Q
m
×
n is denoted by
(1)
f
(
A
)
=
[
A
1
A
2
-
A
2
¯
A
1
¯
]
∈
C
2
m
×
2
n
.
Notice that f
(
A
) is uniquely determined by A. For A
∈
Q
m
×
n, B
∈
Q
n
×
s, we have f
(
A
B
)
=
f
(
A
)
f
(
B
) (see [1]). Denote the trace of a square matrix A
=
(
a
i
j
)
∈
Q
n
×
n by tr
⁡
(
A
)
=
a
11
+
a
22
+
⋯
+
a
n
n. We define the inner product 〈
A
,
B
〉
=
tr
⁡
(
B
H
A
) for all A
,
B
∈
Q
m
×
n. Then Q
m
×
n is a Hilbert inner product space and the norm of a matrix generated by this inner product is the quaternion matrix Frobenius norm ∥
·
∥. The 2-norm of the vector x is denoted by ∥
x
∥.Various aspects of the solutions of matrix equations such asA
X
B
=
C,  A
X
+
X
B
=
C
,
A
X
B
+
C
Y
D
=
E, (
A
X
B
,
C
X
D
)
=
(
E
,
F
) have been investigated. See, for example, [2–35]. For the matrix equation
(2)
A
X
B
+
C
X
D
=
E
,
if B and C are identity matrices, then the matrix equation (2) reduces to the well-known Sylvester equation [5, 36]. If C and D are identity matrices, then the matrix equation (2) reduces to the well-known Stein equation [37]. There are many important results about the matrix equation (2). For example, Hernández and Gassó [38] obtained the explicit solution of the matrix equation (2). Mansour [11] considered the solvability condition of the matrix equation (2) in the operator algebra. Mitra [39] studied the solvability conditions of matrix equation (2). For the quaternion matrix equation (2). Huang [40] obtained necessary and sufficient conditions for the existence of a solution or a unique solution using the method of complex representation of quaternion matrices.Note that some authors have investigated the real and pure imaginary solutions to the quaternion matrix equations. For example, Au-Yeung and Cheng [2] considered the pure imaginary quaternionic solutions of the Hurwitz matrix equations. Wang et al. [41] studied the quaternion matrix equation A
X
B
=
C and obtained necessary and sufficient conditions for the existence of a real solution or pure imaginary solution of the quaternion matrix equation A
X
B
=
C. Using the complex representation of quaternion matrices and the Moore-Penrose generalized inverse, Yuan et al. [42] derived the expressions of the least squares solution with the least norm, the least squares pure imaginary solution with the least norm, and the least squares real solution with the least norm for the quaternion matrix equation A
X
=
B, respectively. Motivated by the work mentioned above, in this paper, we will consider the related problem of quaternion matrix equation (2).Problem 1.
GivenA
∈
Q
m
×
n,  B
∈
Q
k
×
s, C
∈
Q
m
×
n,  D
∈
Q
k
×
s,  E
∈
Q
m
×
s, let
(3)
H
L
=
{
min
⁡
X
0
∈
Q
n
×
k
∥
A
X
0
B
+
C
X
0
D
-
E
∥
X
∣
X
∈
Q
n
×
k
,
∥
A
X
B
+
C
X
D
-
E
∥
=
min
⁡
X
0
∈
Q
n
×
k
∥
A
X
0
B
+
C
X
0
D
-
E
∥
}
.
FindX
H
∈
H
L such that
(4)
∥
X
H
∥
=
min
⁡
X
∈
H
L
∥
X
∥
.Problem 2.
GivenA
∈
Q
m
×
n, B
∈
Q
k
×
s, C
∈
Q
m
×
n, D
∈
Q
k
×
s, E
∈
Q
m
×
s, let
(5)
J
L
=
{
min
⁡
X
0
∈
Q
n
×
k
∥
A
X
0
B
+
C
X
0
D
-
E
∥
X
∣
X
∈
IQ
n
×
k
,
∥
A
X
B
+
C
X
D
-
E
∥
=
min
⁡
X
0
∈
I
Q
n
×
k
∥
A
X
0
B
+
C
X
0
D
-
E
∥
}
.
Find X
J
∈
J
L such that
(6)
∥
X
J
∥
=
min
⁡
X
∈
J
L
∥
X
∥
.Problem 3.
GivenA
∈
Q
m
×
n, B
∈
Q
k
×
s,  C
∈
Q
m
×
n, D
∈
Q
k
×
s, E
∈
Q
m
×
s, let
(7)
A
L
=
{
min
⁡
X
0
∈
Q
n
×
k
∥
A
X
0
B
+
C
X
0
D
-
E
∥
X
∣
X
∈
R
n
×
k
,
∥
A
X
B
+
C
X
D
-
E
∥
=
min
⁡
X
0
∈
R
n
×
k
∥
A
X
0
B
+
C
X
0
D
-
E
∥
}
.
Find X
A
∈
A
L such that
(8)
∥
X
A
∥
=
min
⁡
X
∈
A
L
∥
X
∥
.The solutionX
H of Problem 1 is called the least squares solution with the least norm; the solution X
J of Problem 2 is called the least squares pure imaginary solution with the least norm; and the solution X
A of Problem 3 is called the least squares real solution with the least norm for matrix equation (2) over the skew field of quaternions.This paper is organized as follows. In Section2, we derive the explicit expression for the solution of Problem 1. In Section 3, we derive the explicit expression for the solution of Problem 2. In Section 4, we derive the explicit expression for the solution of Problem 3. Finally, in Section 5, we report numerical algorithms and numerical examples to illustrate our results.


## 2.  The Solution of Problem1

To study Problem1, we begin with the following lemmas.Lemma 4 (see [43]).
The matrix equationA
x
=
b, with A
∈
R
m
×
n and b
∈
R
n, has a solution x
∈
R
n if and only if
(9)
A
A
+
b
=
b
;
in this case it has the general solution
(10)
x
=
A
+
b
+
(
I
-
A
+
A
)
y
,
where y
∈
R
n is an arbitrary vector.Lemma 5 (see [43]).
The least squares solutions of the matrix equationA
x
=
b, with A
∈
R
m
×
n and b
∈
R
n, can be represented as
(11)
x
=
A
+
b
+
(
I
-
A
+
A
)
y
,
where y
∈
R
n is an arbitrary vector, and the least squares solution of the matrix equation A
x
=
b with the least norm is x
=
A
+
b.We identifyq
∈
Q with a complex vector q
→
∈
C
2 and denote such an identification by the symbol ≅, that is;
(12)
c
1
+
c
2
j
=
q
≅
q
→
=
(
c
1
,
c
2
)
.
For A
=
A
1
+
A
2
j
∈
Q
m
×
n, we have A
≅
Φ
A
=
(
A
1
,
A
2
) and
(13)
∥
A
∥
=
∥
Φ
A
∥
=
∥
Re
A
1
∥
2
+
∥
Im
⁡
A
1
∥
2
+
∥
Re
A
2
∥
2
+
∥
Im
⁡
A
2
∥
2
.
We denote A
→
=
(
Re
A
1
,
Im
⁡
A
1
,
Re
A
2
,
Im
⁡
A
2
),
(14)
vec
⁡
(
A
→
)
=
[
vec
⁡
(
Re
A
1
)
vec
⁡
(
Im
⁡
A
1
)
vec
⁡
(
Re
A
2
)
vec
⁡
(
Im
⁡
A
2
)
]
.
Notice that ∥
Φ
A
∥
=
∥
A
→
∥. In particular, for A
=
A
1
+
A
2
i
∈
C
m
×
n with A
1
,
A
2
∈
R
m
×
n, we have A
≅
A
→
=
(
A
1
,
A
2
), and
(15)
vec
⁡
(
A
1
)
+
vec
⁡
(
A
2
)
i
=
vec
⁡
(
A
)
≅
vec
⁡
(
A
→
)
=
[
vec
⁡
(
A
1
)
vec
⁡
(
A
2
)
]
.Addition of two quaternion matricesA
=
A
1
+
A
2
j and B
=
B
1
+
B
2
j is defined by
(16)
(
A
1
+
B
1
)
+
(
A
2
+
B
2
)
j
=
(
A
+
B
)
≅
Φ
A
+
B
=
(
A
1
+
B
1
,
A
2
+
B
2
)
,
whereas multiplication is defined as
(17)
A
B
=
(
A
1
+
A
2
j
)
(
B
1
+
B
2
j
)
=
(
A
1
B
1
-
A
2
B
2
¯
)
+
(
A
1
B
2
+
A
2
B
1
¯
)
j
.
So Φ
A
+
B
=
Φ
A
+
Φ
B,  A
B
≅
Φ
A
B; moreover, Φ
A
B can be expressed as
(18)
Φ
A
B
=
(
A
1
B
1
-
A
2
B
2
¯
,
A
1
B
2
+
A
2
B
1
¯
)
=
(
A
1
,
A
2
)
[
B
1
B
2
-
B
2
¯
B
1
¯
]
=
Φ
A
f
(
B
)
.Lemma 6 (see [34]).
LetA
=
A
1
+
A
2
j
∈
Q
m
×
n,  B
=
B
1
+
B
2
j
∈
Q
n
×
s, and C
=
C
1
+
C
2
j
∈
Q
s
×
t be given. Then
(19)
vec
⁡
(
Φ
A
B
C
)
=
(
f
(
C
)
T
⊗
A
1
,
f
(
C
j
)
H
⊗
A
2
)
[
vec
⁡
(
Φ
B
)
vec
⁡
(
-
Φ
j
B
j
)
]
.Lemma 7.
ForX
=
X
1
+
X
2
j
∈
Q
n
×
k, let
(20)
K
=
[
I
n
k
i
I
n
k
0
0
0
0
I
n
k
i
I
n
k
I
n
k
-
i
I
n
k
0
0
0
0
I
n
k
-
i
I
n
k
]
.
Then
(21)
[
vec
⁡
(
Φ
X
)
vec
⁡
(
-
Φ
j
X
j
)
]
=
K
vec
⁡
(
X
→
)
.Proof.
ForX
=
X
1
+
X
2
j
∈
Q
n
×
k, we have
(22)
[
vec
⁡
(
Φ
X
)
vec
⁡
(
-
Φ
j
X
j
)
]
=
[
vec
⁡
(
X
1
)
vec
⁡
(
X
2
)
vec
⁡
(
X
1
¯
)
vec
⁡
(
X
2
¯
)
]
=
[
I
n
k
i
I
n
k
0
0
0
0
I
n
k
i
I
n
k
I
n
k
-
i
I
n
k
0
0
0
0
I
n
k
-
i
I
n
k
]
[
vec
⁡
(
Re
(
X
1
)
)
vec
⁡
(
Im
⁡
(
X
1
)
)
vec
⁡
(
Re
(
X
2
)
)
vec
⁡
(
Im
⁡
(
X
2
)
)
]
=
K
vec
⁡
(
X
→
)
.By Lemmas6 and 7, we have the following.Lemma 8.
IfA
=
A
1
+
A
2
j
∈
Q
m
×
n,  X
=
X
1
+
X
2
j
∈
Q
n
×
k, and B
=
B
1
+
B
2
j
∈
Q
k
×
s, then
(23)
vec
⁡
(
Φ
A
X
B
)
=
(
f
(
B
)
T
⊗
A
1
,
f
(
B
j
)
H
⊗
A
2
)
K
vec
⁡
(
X
→
)
.Based on our earlier discussions, we now turn our attention to Problem1. The following notations are necessary for deriving the solutions of Problem 1. For A
=
A
1
+
A
2
j
∈
Q
m
×
n,  B
∈
Q
k
×
s,  C
=
C
1
+
C
2
j
∈
Q
m
×
n,  D
∈
Q
k
×
s,  E
∈
Q
m
×
s, set
(24)
P
=
(
f
(
B
)
T
⊗
A
1
+
f
(
D
)
T
⊗
C
1
,
f
(
B
j
)
H
⊗
A
2
+
f
(
D
j
)
H
⊗
C
2
)
K
,
P
1
=
Re
(
P
)
,
P
2
=
Im
⁡
(
P
)
,
e
=
[
vec
⁡
(
Re
(
Φ
E
)
)
vec
⁡
(
Im
⁡
(
Φ
E
)
)
]
,
(25)
R
=
(
I
4
n
k
-
P
1
+
P
1
)
P
2
T
,
H
=
R
+
+
(
I
2
m
s
-
R
+
R
)
Z
P
2
P
1
+
P
1
+
T
(
I
4
n
k
-
P
2
T
R
+
)
,
Z
=
(
I
2
m
s
+
(
I
2
m
s
-
R
+
R
)
P
2
P
1
+
P
1
+
T
P
2
T
(
I
2
m
s
-
R
+
R
)
)
-
1
,
S
11
=
I
2
m
s
-
P
1
P
1
+
+
P
1
+
T
P
2
T
Z
(
I
2
m
s
-
R
+
R
)
P
2
P
1
+
,
S
12
=
-
P
1
+
T
P
2
T
(
I
2
m
s
-
R
+
R
)
Z
,
S
22
=
(
I
2
m
s
-
R
+
R
)
Z
.
From the results in [33], one has
(26)
[
P
1
P
2
]
+
=
(
P
1
+
-
H
T
P
2
P
1
+
,
H
T
)
,
[
P
1
P
2
]
+
[
P
1
P
2
]
=
P
1
+
P
1
+
R
R
+
,
I
4
n
k
-
[
P
1
P
2
]
[
P
1
P
2
]
+
=
[
S
11
S
12
S
12
T
S
22
]
.Theorem 9.
LetA
∈
Q
m
×
n,  B
∈
Q
k
×
s, C
∈
Q
m
×
n,  D
∈
Q
k
×
s, and
E
∈
Q
m
×
s, and let P
1, P
2, e be as in (24). Then
(27)
H
L
=
{
X
∣
vec
⁡
(
X
→
)
=
(
P
1
+
-
H
T
P
2
P
1
+
,
H
T
)
e
+
(
I
-
P
1
+
P
1
-
R
R
+
)
y
(
X
→
)
}
,
where y is an arbitrary vector of appropriate order.Proof.
By Lemmas5 and 8, we can get
(28)
∥
A
X
B
+
C
X
D
-
E
∥
2
=
∥
Φ
A
X
B
+
C
X
D
-
E
∥
2
=
∥
vec
⁡
(
Φ
A
X
B
+
C
X
D
-
E
)
∥
2
=
∥
vec
⁡
(
Φ
A
X
B
+
Φ
C
X
D
-
Φ
E
)
∥
2
=
∥
vec
⁡
(
Φ
A
X
B
)
+
vec
⁡
(
Φ
C
X
D
)
-
vec
⁡
(
Φ
E
)
∥
2
=
∥
P
vec
⁡
(
X
→
)
-
vec
⁡
(
Φ
E
)
∥
2
=
∥
(
P
1
+
i
P
2
)
vec
⁡
(
X
→
)
-
[
vec
⁡
(
Re
(
Φ
E
)
)
+
i
vec
⁡
(
Im
⁡
(
Φ
E
)
)
]
(
X
→
)
∥
2
=
∥
[
P
1
P
2
]
vec
⁡
(
X
→
)
-
e
∥
2
.
By Lemma 5, it follows that
(29)
vec
⁡
(
X
→
)
=
[
P
1
P
2
]
+
e
+
[
I
4
n
k
-
[
P
1
P
2
]
+
[
P
1
P
2
]
]
y
;
thus
(30)
vec
⁡
(
X
→
)
=
(
P
1
+
-
H
T
P
2
P
1
+
,
H
T
)
e
+
(
I
4
n
k
-
P
1
+
P
1
-
R
R
+
)
y
.
The proof is completed.By Lemma4 and Theorem 9, we get the following conclusion.Corollary 10.
The quaternion matrix equation (2) has a solution X
∈
Q
n
×
k if and only if
(31)
[
S
11
S
12
S
12
T
S
22
]
e
=
0
.
In this case, denote by H
E the solution set of (2). Then
(32)
H
E
=
{
X
∣
vec
⁡
(
X
→
)
=
(
P
1
+
-
H
T
P
2
P
1
+
,
H
T
)
e
+
(
I
-
P
1
+
P
1
-
R
R
+
)
y
vec
⁡
(
X
→
)
}
,
where y is an arbitrary vector of appropriate order.
Furthermore, if (31) holds, then the quaternion matrix equation (2) has a unique solution X
∈
H
E if and only if
(33)
rank
⁡
[
P
1
P
2
]
=
4
n
k
.
In this case,
(34)
H
E
=
{
X
∣
vec
⁡
(
X
→
)
=
(
P
1
+
-
H
T
P
2
P
1
+
,
H
T
)
e
}
.Theorem 11.
Problem1 has a unique solution X
H
∈
H
L. This solution satisfies
(35)
vec
⁡
(
X
→
H
)
=
(
P
1
+
-
H
T
P
2
P
1
+
,
H
T
)
e
.Proof.
From (27), it is easy to verify that the solution set H
L is nonempty and is a closed convex set. Hence, Problem 1 has a unique solution X
H
∈
H
L.
We now prove that the solutionX
H can be expressed as (35).
From (27), we have
(36)
min
⁡
X
∈
H
L
∥
X
∥
=
min
⁡
X
∈
H
L
∥
vec
⁡
(
X
→
)
∥
;
by Lemma 5 and (27),
(37)
vec
⁡
(
X
→
)
=
[
P
1
P
2
]
+
e
.
Thus,
(38)
vec
⁡
(
X
→
)
=
(
P
1
+
-
H
T
P
2
P
1
+
,
H
T
)
e
.
Thus we have completed the proof.Corollary 12.
The least norm problem(39)
∥
X
H
∥
=
min
⁡
X
∈
H
E
∥
X
∥
has a unique solution X
H
∈
H
E and X
H can be expressed as (35).


## 3. The Solution of Problem2

We now discuss the solution of Problem2. For X
=
X
1
+
X
2
j
∈
I
Q
n
×
k, we have Re
(
X
1
)
=
0.ForA
=
A
1
+
A
2
j
∈
Q
m
×
n, B
∈
Q
k
×
s, C
=
C
1
+
C
2
j
∈
Q
m
×
n, D
∈
Q
k
×
s, E
∈
Q
m
×
s, set
(40)
Q
=
(
f
(
B
)
T
⊗
A
1
+
f
(
D
)
T
⊗
C
1
,
f
(
B
j
)
H
⊗
A
2
+
f
(
D
j
)
H
⊗
C
2
)
×
[
i
I
n
k
0
0
0
I
n
k
i
I
n
k
-
i
I
n
k
0
0
0
I
n
k
-
i
I
n
k
]
,
(41)
Q
1
=
Re
(
Q
)
,
Q
2
=
Im
⁡
(
Q
)
,
e
=
[
vec
⁡
(
Re
(
Φ
E
)
)
vec
⁡
(
Im
⁡
(
Φ
E
)
)
]
,
(42)
R
1
=
(
I
3
n
k
-
Q
1
+
Q
1
)
Q
2
T
,
H
1
=
R
1
+
+
(
I
2
m
s
-
R
1
+
R
1
)
×
Z
1
Q
2
Q
1
+
Q
1
+
T
(
I
3
n
k
-
Q
2
T
R
1
+
)
,
Z
1
=
(
I
2
m
s
+
(
I
-
R
1
+
R
1
)
×
Q
2
Q
1
+
Q
1
+
T
Q
2
T
(
I
2
m
s
-
R
1
+
R
1
)
)
-
1
,
Δ
11
=
I
2
m
s
-
Q
1
Q
1
+
+
Q
1
+
T
Q
2
T
Z
1
×
(
I
2
m
s
-
R
1
+
R
1
)
Q
2
Q
1
+
,
Δ
12
=
-
Q
1
+
T
Q
2
T
(
I
2
m
s
-
R
1
+
R
1
)
Z
1
,
Δ
22
=
(
I
2
m
s
-
R
1
+
R
1
)
Z
1
.
Thus we have
(43)
[
Q
1
Q
2
]
+
=
(
Q
1
+
-
H
1
T
Q
2
Q
1
+
,
H
1
T
)
,
[
Q
1
Q
2
]
+
[
Q
1
Q
2
]
=
Q
1
+
Q
1
+
R
1
R
1
+
,
I
3
n
k
-
[
Q
1
Q
2
]
[
Q
1
Q
2
]
+
=
[
Δ
11
Δ
12
Δ
12
T
Δ
22
]
.We now study Problem2. Since the methods are the same as in Section 2, we only describe the following results using Lemmas 4 and 5 and Theorem 9 and omit their detailed proofs.Theorem 13.
LetA
∈
Q
m
×
n,  B
∈
Q
k
×
s, C
∈
Q
m
×
n,  D
∈
Q
k
×
s, and E
∈
Q
m
×
s; let Q
1,  Q
2,  E be as in (41). Then the set J
L of Problem 2 can be expressed as
(44)
J
L
=
{
X
∣
[
vec
⁡
(
Im
⁡
(
X
1
)
)
vec
⁡
(
Re
(
X
2
)
)
vec
⁡
(
Im
⁡
(
X
2
)
)
]
=
(
Q
1
+
-
H
1
T
Q
2
Q
1
+
,
H
1
T
)
e
+
(
I
3
n
k
-
Q
1
+
Q
1
-
R
1
R
1
+
)
y
[
vec
⁡
(
Im
⁡
(
X
1
)
)
vec
⁡
(
Re
(
X
2
)
)
vec
⁡
(
Im
⁡
(
X
2
)
)
]
}
,
where y is an arbitrary vector of appropriate order.Corollary 14.
The quaternion matrix equation (2) has a solution X
∈
IQ
m
×
n if and only if
(45)
[
Δ
11
Δ
12
Δ
12
T
Δ
22
]
e
=
0
.
In this case, denote by J
E the pure imaginary solution set of (2). Then
(46)
J
E
=
{
X
∣
[
vec
⁡
(
Im
⁡
(
X
1
)
)
vec
⁡
(
Re
(
X
2
)
)
vec
⁡
(
Im
⁡
(
X
2
)
)
]
=
(
Q
1
+
-
H
1
T
Q
2
Q
1
+
,
H
1
T
)
e
+
(
I
3
n
k
-
Q
1
+
Q
1
-
R
1
R
1
+
)
y
[
vec
⁡
(
Im
⁡
(
X
1
)
)
vec
⁡
(
Re
(
X
2
)
)
vec
⁡
(
Im
⁡
(
X
2
)
)
]
}
,
where y is an arbitrary vector of appropriate order.
Furthermore, if (45) holds, then the quaternion matrix equation (2) has a unique solution X
∈
J
E if and only if
(47)
rank
⁡
[
Q
1
Q
2
]
=
3
n
k
.
In this case,
(48)
J
E
=
{
X
∣
[
vec
⁡
(
Im
⁡
(
X
1
)
)
vec
⁡
(
Re
(
X
2
)
)
vec
⁡
(
Im
⁡
(
X
2
)
)
]
=
(
Q
1
+
-
H
1
T
Q
2
Q
1
+
,
H
1
T
)
e
}
.Theorem 15.
Problem2 has a unique solution X
J
=
Im
X
J
1
i
+
Re
X
J
2
j
+
Im
X
J
2
k
∈
J
L. This solution satisfies
(49)
[
vec
⁡
(
Im
⁡
(
X
J
1
)
)
vec
⁡
(
Re
(
X
J
2
)
)
vec
⁡
(
Im
⁡
(
X
J
2
)
)
]
=
(
Q
1
+
-
H
1
T
Q
2
Q
1
+
,
H
1
T
)
e
.Corollary 16.
The least norm problem(50)
∥
X
J
∥
=
min
⁡
X
∈
J
E
∥
X
∥
has a unique solution X
J
=
Im
X
J
1
i
+
Re
X
J
2
j
+
Im
X
J
2
k
∈
J
E and X
J can be expressed as (49).


## 4. The Solution of Problem3

We now discuss the solution of Problem3. For X
=
X
1
+
X
2
j
∈
R
n
×
k, we have Im
⁡
(
X
1
)
=
Re
(
X
2
)
=
Im
⁡
(
X
2
)
=
0, and X
=
Re
(
X
1
). Thus, we have the following lemmas.ForA
=
A
1
+
A
2
j
∈
Q
m
×
n,  B
∈
Q
k
×
s,  C
=
C
1
+
C
2
j
∈
Q
m
×
n,  D
∈
Q
k
×
s,  E
∈
Q
m
×
s, set
(51)
T
=
(
f
(
B
)
T
⊗
A
1
+
f
(
D
)
T
⊗
C
1
,
f
(
B
j
)
H
⊗
A
2
+
f
(
D
j
)
H
⊗
C
2
)
[
I
n
k
0
I
n
k
0
]
,
(52)
T
1
=
Re
(
T
)
,
T
2
=
Im
⁡
(
T
)
,
e
=
[
vec
⁡
(
Re
(
Φ
E
)
)
vec
⁡
(
Im
⁡
(
Φ
E
)
)
]
,
(53)
R
2
=
(
I
n
k
-
T
1
+
T
1
)
T
2
T
,
H
2
=
R
2
+
+
(
I
2
m
s
-
R
2
+
R
2
)
Z
2
T
2
T
1
+
T
1
+
T
(
I
n
k
-
T
2
T
R
2
+
)
,
Z
2
=
(
T
2
T
1
+
T
1
+
T
T
2
T
(
I
2
m
s
-
R
2
+
R
2
)
)
-
1
I
2
m
s
+
(
I
2
m
s
-
R
2
+
R
2
)
×
T
2
T
1
+
T
1
+
T
T
2
T
(
I
2
m
s
-
R
2
+
R
2
)
)
-
1
,
Λ
11
=
I
2
m
s
-
T
1
T
1
+
+
T
1
+
T
T
2
T
Z
2
(
I
2
m
s
-
R
1
+
R
1
)
T
2
T
1
+
,
Λ
12
=
-
T
1
+
T
T
2
T
(
I
2
m
s
-
R
2
+
R
2
)
Z
2
,
Λ
22
=
(
I
2
m
s
-
R
2
+
R
2
)
Z
2
.
We have
(54)
[
T
1
T
2
]
+
=
(
T
1
+
-
H
2
T
T
2
T
1
+
,
H
2
T
)
,
[
T
1
T
2
]
+
[
T
1
T
2
]
=
T
1
+
T
1
+
R
2
R
2
+
,
I
n
k
-
[
T
1
T
2
]
[
T
1
T
2
]
+
=
[
Λ
11
Λ
12
Λ
12
T
Λ
22
]
.By Lemma5, we can easily get the following results for Problem 3.Theorem 17.
LetA
∈
Q
m
×
n,  B
∈
Q
k
×
s, C
∈
Q
m
×
n,  D
∈
Q
k
×
s,and
E
∈
Q
m
×
s; let T
1,  T
2,  e be as in (52). Then the set A
L of Problem 3 can be expressed as
(55)
A
L
=
{
X
∣
vec
⁡
(
Re
(
X
1
)
)
=
(
T
1
+
-
H
2
T
T
2
T
1
+
,
H
2
T
)
e
+
(
I
n
k
-
T
1
+
T
1
-
R
2
R
2
+
)
y
(
T
1
+
-
H
2
T
T
2
T
1
+
,
H
2
T
)
}
,
where y is an arbitrary vector of appropriate order.Corollary 18.
The quaternion matrix equation (2) has a solution X
∈
R
m
×
n if and only if
(56)
[
Λ
11
Λ
12
Λ
12
T
Λ
22
]
e
=
0
.
In this case, denote by A
E the real solution set of (2). Then
(57)
A
E
=
{
X
∣
vec
⁡
(
Re
(
X
1
)
)
=
(
T
1
+
-
H
2
T
T
2
T
1
+
,
H
2
T
)
e
+
(
I
n
k
-
T
1
+
T
1
-
R
2
R
2
+
)
y
(
T
1
+
-
H
2
T
T
2
T
1
+
,
H
2
T
)
}
,
where y is an arbitrary vector of appropriate order.
Furthermore, if (56) holds, then the quaternion matrix equation (2) has a unique solution X
∈
A
E if and only if
(58)
rank
⁡
[
T
1
T
2
]
=
n
k
.
In this case,
(59)
A
E
=
{
X
∣
vec
⁡
(
Re
(
X
1
)
)
=
(
T
1
+
-
H
2
T
T
2
T
1
+
,
H
2
T
)
e
}
.Theorem 19.
Problem3 has a unique solution X
A
∈
A
L. This solution satisfies
(60)
vec
⁡
(
Re
X
A
)
=
(
T
1
+
-
H
2
T
T
2
T
1
+
,
H
2
T
)
e
.Corollary 20.
The least norm problem(61)
∥
X
A
∥
=
min
⁡
X
∈
A
E
∥
X
∥
has a unique solution X
A
∈
A
E and X
A can be expressed as (60).


## 5. Numerical Verification

Based on the discussions in Sections2, 3, and 4, we report numerical tests in this section. We give three numerical algorithms and four numerical examples to find the solutions of Problems 1, 2, and 3.Algorithms21, 22, and 23 provide the methods to find the solutions of Problems 1, 2, and 3. If the consistent conditions for matrix equation (2) hold, Examples 24 and 25 consider the numerical solutions of Problem 1 for X
∈
Q
n
×
k. In Examples 26 and 27, if the consistent conditions for matrix equation (2) are not satisfied, we can compute the least squares solution with the least norm in Problems 2 and 3 by Algorithms 22 and 23, respectively. For demonstration purpose and avoiding the matrices with large norm to interrupt the solutions of Problems 1 and 2, we only consider the coefficient matrices of small sizes in numerical experiments.Algorithm 21 (for Problem1).
We have the following.(1)
InputA, B, C, D, and E (A
∈
Q
m
×
n,  B
∈
Q
k
×
s,  C
∈
Q
m
×
n,  D
∈
Q
k
×
s, and E
∈
Q
m
×
s).
(2)
ComputeP
1, P
2, R, H, Z, S
11, S
12, S
22, e.
(3)
If (31) and (33) hold, then calculate X
H
(
X
H
∈
H
E
) according to (34).
(4)
If (31) holds, then calculate X
H
(
X
H
∈
H
E
) according to (35). Otherwise go to next step.
(5)
CalculateX
H
(
X
H
∈
H
L
) according to (35).Algorithm 22 (for Problem2).
We have the following.(1)
InputA, B, C, D, and E (A
∈
Q
m
×
n,  B
∈
Q
k
×
s,  C
∈
Q
m
×
n,  D
∈
Q
k
×
s, and E
∈
Q
m
×
s).
(2)
ComputeQ
1, Q
2, R
1, Z
1, H
1, Δ
11, Δ
12, Δ
22, e.
(3)
If (45) and (47) hold, then calculate X
J
(
X
A
∈
J
E
) according to (48).
(4)
If (45) holds, then calculate X
J
(
X
J
∈
J
E
) according to (49). Otherwise go to next step.
(5)
CalculateX
A
(
X
J
∈
J
L
) according to (49).Algorithm 23 (for Problem3).
We have the following.(1)
InputA, B, C, D, and E (A
∈
Q
m
×
n,  B
∈
Q
k
×
s,  C
∈
Q
m
×
n,  D
∈
Q
k
×
s, and E
∈
Q
m
×
s).
(2)
ComputeT
1, T
2, R
2, Z
2, H
2, Λ
11, Λ
12, Λ
22, e.
(3)
If (56) and (58) hold, then calculate X
A
(
X
A
∈
A
E
) according to (59).
(4)
If (56) holds, then calculate X
A
(
X
A
∈
A
E
) according to (60). Otherwise go to next step.
(5)
CalculateX
A
(
X
A
∈
A
L
) according to (60).Example 24.
Letm
=
6, n
=
6, k
=
5, s
=
5,
(62)
A
=
A
1
+
A
2
j
,
B
=
B
1
+
B
2
j
,
C
=
C
1
+
C
2
j
,
D
=
D
1
+
D
2
j
,
X
=
X
1
+
X
2
j
,
E
=
A
X
B
+
C
X
D, where
(63)
A
1
=
eye
(
m
)
+
ones
(
n
)
i
,
A
2
=
magic
(
m
)
+
ones
(
n
)
i
,
B
1
=
ones
(
k
)
+
eye
(
k
)
i
,
B
2
=
eye
(
s
)
+
magic
(
s
)
i
,
C
1
=
eye
(
m
)
+
magic
(
n
)
i
,
C
2
=
magic
(
m
)
+
eye
(
n
)
i
,
D
1
=
ones
(
k
)
+
ones
(
k
)
i
,
D
2
=
eye
(
s
)
+
ones
(
s
)
i
,
X
1
=
rand
(
n
,
k
)
+
randn
(
n
,
k
)
i
,
X
2
=
randn
(
n
,
k
)
+
rand
(
n
,
k
)
i
.
Let(64)
Φ
A
=
(
A
1
,
A
2
)
,
Φ
B
=
(
B
1
,
B
2
)
,
Φ
C
=
(
C
1
,
C
2
)
,
Φ
D
=
(
D
1
,
D
2
)
,
Φ
X
=
(
X
1
,
X
2
)
,
Φ
E
=
Φ
A
f
(
X
)
f
(
B
)
+
Φ
C
f
(
X
)
f
(
D
)
.
By using matlab 7.7 and Algorithm 21, we obtain
(65)
rank
⁡
[
P
1
P
2
]
=
120
,
∥
[
S
11
S
12
S
12
T
S
22
]
e
∥
=
2.2435
×
1
0
-
9
.
According to Algorithm 21 (
3
), we can see the matrix equation A
X
B
+
C
X
D
=
E has a unique solution which is a unique solution with the least norm X
H
∈
H
E. We can get ∥
X
H
-
X
∥
=
8.3184
×
1
0
-
13.Example 25.
Letm
=
6, n
=
6, k
=
5, s
=
5,
(66)
A
=
A
1
+
A
2
j
,
B
=
B
1
+
B
2
j
,
C
=
C
1
+
C
2
j
,
D
=
D
1
+
D
2
j
,
X
=
X
1
+
X
2
j
,
E
=
A
X
B
+
C
X
D, where
(67)
A
1
=
ones
(
n
)
i
,
A
2
=
zeros
(
n
)
,
B
1
=
ones
(
k
)
,
B
2
=
eye
(
s
)
i
,
C
1
=
magic
(
n
)
,
C
2
=
eye
(
n
)
i
,
D
1
=
zeros
(
k
)
,
D
2
=
ones
(
s
)
i
,
X
1
=
rand
(
n
,
k
)
+
randn
(
n
,
k
)
i
,
X
2
=
randn
(
n
,
k
)
+
rand
(
n
,
k
)
i
.
Let(68)
Φ
A
=
(
A
1
,
A
2
)
,
Φ
B
=
(
B
1
,
B
2
)
,
Φ
C
=
(
C
1
,
C
2
)
,
Φ
D
=
(
D
1
,
D
2
)
,
Φ
X
=
(
X
1
,
X
2
)
,
Φ
E
=
Φ
A
f
(
X
)
f
(
B
)
+
Φ
C
f
(
X
)
f
(
D
)
.
By using matlab 7.7 and Algorithm 21, we obtain
(69)
rank
⁡
[
P
1
P
2
]
=
40
,
∥
[
S
11
S
12
S
12
T
S
22
]
e
∥
=
1.0356
×
1
0
-
10
.
According to Algorithm 21 (
3
), we can see the matrix equation A
X
B
+
C
X
D
=
E has infinite solution and a unique solution with the least norm X
H
∈
H
E, and we can get ∥
X
H
-
X
∥
=
6.8049.Example 26.
SupposeA, B, C, D, X, Φ
A, Φ
B, Φ
C, Φ
D, Φ
X are the same as in Example 25; by using matlab 7.7 and Algorithm 22, we obtain
(70)
rank
⁡
[
P
1
P
2
]
=
30
,
∥
[
S
11
S
12
S
12
T
S
22
]
e
∥
=
1.8885
×
1
0
3
.
According to Algorithm 22 (
4
), we can see the matrix equation A
X
B
+
C
X
D
=
E has infinite pure imaginary least squares solutions and a unique pure imaginary solution with the least norm X
J
∈
J
L for Problem 2 and we can get ∥
X
J
-
X
∥
=
8.7041, and X
J
=
Im
⁡
X
J
1
i
+
Re
X
J
2
j
+
Im
⁡
X
J
2
k, where(71)
Im
⁡
X
J
1
=
[
0.0323
-
0.1259
-
1.0004
-
0.2715
-
0.4757
0.6627
-
0.2810
0.4537
0.2955
-
0.7813
-
0.4568
0.0128
-
0.9309
0.1404
0.6728
0.5146
-
0.9665
0.0317
-
0.9120
-
0.5095
0.3595
0.4875
0.3294
-
0.4781
-
1.4218
-
0.4906
-
0.2904
0.1743
0.9760
0.8178
]
,
Re
X
J
2
=
[
-
0.3681
0.7317
-
0.1398
0.0302
0.7283
0.0698
0.5187
-
0.8747
0.2251
-
0.4052
0.9515
0.1300
0.5789
0.0122
-
1.1401
-
0.0403
0.5162
0.0317
0.8022
0.0724
-
0.2533
-
0.2188
0.8810
-
0.0821
0.3668
0.2956
-
0.1930
0.6681
-
0.8170
0.2827
]
,
Im
⁡
X
J
2
=
[
1.4629
0.8243
-
0.3951
-
0.5003
0.0911
1.2750
1.2764
1.3112
0.6725
-
0.2591
-
0.5545
0.1595
0.1610
1.1247
1.4472
0.8086
-
0.3133
-
0.4861
-
0.4846
0.0093
1.2607
1.3930
0.7544
-
0.2448
-
0.2434
-
0.6364
0.1453
1.2065
1.4614
0.8228
]
.Example 27.
SupposeA, B, C, D, X, Φ
A, Φ
B, Φ
C, Φ
D, Φ
X are the same as in Example 25. By using matlab 7.7 and Algorithm 22, we obtain
(72)
rank
⁡
[
P
1
P
2
]
=
10
,
∥
[
S
11
S
12
S
12
T
S
22
]
e
∥
=
1.2725
e
+
003
.
According to Algorithm 23 (
5
), we can see the matrix equation A
X
B
+
C
X
D
=
E has infinite least squares real solutions and a unique least squares real solution with the least norm X
A
∈
A
L for Problem 3 and we can get ∥
X
A
-
X
∥
=
1.3046
e
+
017, and
(73)
X
A
=
1
0
16
×
[
3.7968
0.2949
-
1.9996
-
0.7850
-
1.3773
-
3.0782
-
2.4551
4.5700
-
3.1195
-
2.2379
-
4.8106
2.3596
0.6512
-
3.6256
-
0.8427
-
2.4444
-
0.8145
-
3.9656
-
1.7307
-
0.1625
-
2.6617
1.3151
-
1.7554
-
0.6584
1.7804
-
0.6472
-
0.1669
-
3.3724
0.0203
-
1.5349
]
.
Examples 24, 25, 26, and 27 are used to show the feasibility of Algorithms 21, 22, and 23.



---

*Source: 857081-2014-04-15.xml*