  In this paper, we derive a formula to compute the solution of the linear
matrix equation $X=Af(X)B+C$ via finding any solution of a specific Stein
matrix equation $\mathcal{X}=\mathcal{A} \mathcal{X} \mathcal{B}+\mathcal{C}$,
where the linear (or anti-linear) matrix operator $f$ is period-$n$. According
to this formula, we should pay much attention to solve the Stein matrix
equation from recently famous numerical methods. For instance, Smith-type
iterations, Bartels-Stewart algorithm, and etc.. Moreover, this transformation
is used to provide necessary and sufficient conditions of the solvable of the
linear matrix equation. On the other hand, it can be proven that the general
solution of the linear matrix equation can be presented by the general solution
of the Stein matrix equation. The necessary condition of the uniquely solvable
of the linear matrix equation is developed. It is shown that several
representations of this formula are coincident. Some examples are presented to
illustrate and explain our results.
