This paper studies the following two problems: Problem I Given X, B∈Rn×m, find A∈SRnP such that AX=B, where SRnP={A∈SR n×n|PA∈SRn×n,for given P∈OR n×n satisfying PT=P}. Problem II Given A˜∈Rn×n, find A*∈SE such that ∥A˜-A*∥=infA∈SE∥A˜-A∥, where ∥·∥is the Frobenius norm, and SE is the solution set of Problem I. Necessary and sufficient conditions for the solvability of Problem I and the general form of the solution of Problem I are given. For Problem II, the expression of t...