#### 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 equation , respectively.

#### 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 quaternion can be uniquely expressed as with real coefficients , , , , , , and can be uniquely expressed as , where and are complex numbers. Thus, every pure imaginary quaternion can be uniquely expressed as .

Throughout this paper, let , , , , and be the skew field of quaternions, the set of all real matrices, the set of all complex matrices, the set of all quaternion matrices, and the set of all pure imaginary quaternion matrices, respectively. For , and denote the real part and the imaginary part of matrix , respectively. For , , , , and denote the conjugate matrix, the transpose matrix, the conjugate transpose matrix, and the Moore-Penrose generalized inverse matrix of matrix , respectively.

For any , can be uniquely expressed as , where . The complex representation matrix of is denoted by Notice that is uniquely determined by . For , , we have (see [1]). Denote the trace of a square matrix by . We define the inner product for all . Then 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 is denoted by .

Various aspects of the solutions of matrix equations such as , , have been investigated. See, for example, [2–35]. For the matrix equation if and are identity matrices, then the matrix equation (2) reduces to the well-known Sylvester equation [5, 36]. If and 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 and obtained necessary and sufficient conditions for the existence of a real solution or pure imaginary solution of the quaternion matrix equation . 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 , respectively. Motivated by the work mentioned above, in this paper, we will consider the related problem of quaternion matrix equation (2).

*Problem 1. *Given , , , , , let

Find such that

*Problem 2. *Given , , , , , let
Find such that

*Problem 3. *Given , , , , , let
Find such that

The solution of Problem 1 is called the least squares solution with the least norm; the solution of Problem 2 is called the least squares pure imaginary solution with the least norm; and the solution 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 Section 2, 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 Problem 1

To study Problem 1, we begin with the following lemmas.

Lemma 4 (see [43]). *The matrix equation , with and , has a solution if and only if
**
in this case it has the general solution
**
where is an arbitrary vector.*

Lemma 5 (see [43]). *The least squares solutions of the matrix equation , with and , can be represented as
**
where is an arbitrary vector, and the least squares solution of the matrix equation with the least norm is .*

We identify with a complex vector and denote such an identification by the symbol *≅*, that is;
For , we have and
We denote ,
Notice that . In particular, for with , we have , and

Addition of two quaternion matrices and is defined by whereas multiplication is defined as So , ; moreover, can be expressed as

Lemma 6 (see [34]). *Let , , and be given. Then
*

Lemma 7. *For , let
**
Then
*

*Proof. *For , we have

By Lemmas 6 and 7, we have the following.

Lemma 8. *If , , and , then
*

Based on our earlier discussions, we now turn our attention to Problem 1. The following notations are necessary for deriving the solutions of Problem 1. For , , , , , set From the results in [33], one has

Theorem 9. *Let , , , , and , and let , , be as in (24). Then
*

*where is an arbitrary vector of appropriate order.*

*Proof. *By Lemmas 5 and 8, we can get
By Lemma 5, it follows that
thus
The proof is completed.

By Lemma 4 and Theorem 9, we get the following conclusion.

Corollary 10. *The quaternion matrix equation (2) has a solution if and only if
**
In this case, denote by the solution set of (2). Then
**
where is an arbitrary vector of appropriate order.**Furthermore, if (31) holds, then the quaternion matrix equation (2) has a unique solution if and only if
**
In this case,
*

Theorem 11. *Problem 1 has a unique solution . This solution satisfies
*

*Proof. *From (27), it is easy to verify that the solution set is nonempty and is a closed convex set. Hence, Problem 1 has a unique solution .

We now prove that the solution can be expressed as (35).

From (27), we have
by Lemma 5 and (27),
Thus,
Thus we have completed the proof.

Corollary 12. *The least norm problem
**
has a unique solution and can be expressed as (35).*

#### 3. The Solution of Problem 2

We now discuss the solution of Problem 2. For , we have .

For , , , , , set Thus we have

We now study Problem 2. 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. *Let , , , , and ; let , , be as in (41). Then the set of Problem 2 can be expressed as
**
where is an arbitrary vector of appropriate order.*

Corollary 14. *The quaternion matrix equation (2) has a solution if and only if
**
In this case, denote by the pure imaginary solution set of (2). Then
**
where is an arbitrary vector of appropriate order.**Furthermore, if (45) holds, then the quaternion matrix equation (2) has a unique solution if and only if
**
In this case,
*

Theorem 15. *Problem 2 has a unique solution . This solution satisfies
*

Corollary 16. *The least norm problem
**
has a unique solution and can be expressed as (49).*

#### 4. The Solution of Problem 3

We now discuss the solution of Problem 3. For , we have , and . Thus, we have the following lemmas.

For , , , , , set We have

By Lemma 5, we can easily get the following results for Problem 3.

Theorem 17. *Let , , , , and ; let , , be as in (52). Then the set of Problem 3 can be expressed as
*

*where is an arbitrary vector of appropriate order.*

Corollary 18. *The quaternion matrix equation (2) has a solution if and only if
**
In this case, denote by the real solution set of (2). Then
**
where is an arbitrary vector of appropriate order.**Furthermore, if (56) holds, then the quaternion matrix equation (2) has a unique solution if and only if
**
In this case,
*

Theorem 19. *Problem 3 has a unique solution . This solution satisfies
*

Corollary 20. *The least norm problem
**
has a unique solution and can be expressed as (60).*

#### 5. Numerical Verification

Based on the discussions in Sections 2, 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.

Algorithms 21, 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 . 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 Problem 1). *We have the following.(1)Input , , , , and (, , , , and ).(2)Compute , , , , , , , , .(3)If (31) and (33) hold, then calculate according to (34).(4)If (31) holds, then calculate according to (35). Otherwise go to next step.(5)Calculate according to (35).

*Algorithm 22 (for Problem 2). *We have the following.(1)Input , , , , and (, , , , and ).(2)Compute , , , , , , , , .(3)If (45) and (47) hold, then calculate according to (48).(4)If (45) holds, then calculate according to (49). Otherwise go to next step.(5)Calculate according to (49).

*Algorithm 23 (for Problem 3). *We have the following.(1)Input , , , , and (, , , , and ).(2)Compute , , , , , , , , .(3)If (56) and (58) hold, then calculate according to (59).(4)If (56) holds, then calculate according to (60). Otherwise go to next step.(5)Calculate according to (60).

*Example 24. *Let , , , ,
, where

Let
By using matlab 7.7 and Algorithm 21, we obtain
According to Algorithm 21 , we can see the matrix equation has a unique solution which is a unique solution with the least norm . We can get .

*Example 25. *Let , , , ,
, where

Let
By using matlab 7.7 and Algorithm 21, we obtain
According to Algorithm 21 , we can see the matrix equation has infinite solution and a unique solution with the least norm , and we can get .

*Example 26. *Suppose , , , , , , , , , are the same as in Example 25; by using matlab 7.7 and Algorithm 22, we obtain
According to Algorithm 22 , we can see the matrix equation has infinite pure imaginary least squares solutions and a unique pure imaginary solution with the least norm for Problem 2 and we can get , and , where

*Example 27. *Suppose , , , , , , , , , are the same as in Example 25. By using matlab 7.7 and Algorithm 22, we obtain
According to Algorithm 23 , we can see the matrix equation has infinite least squares real solutions and a unique least squares real solution with the least norm for Problem 3 and we can get , and
Examples 24, 25, 26, and 27 are used to show the feasibility of Algorithms 21, 22, and 23.

#### Conflict of Interests

The author declares that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

This work is supported by Natural Science Foundation of China (no. 11301397), Guangdong Natural Science Fund of China (no. 10452902001005845), and Science and Technology Project of Jiangmen City, China.