  Stationary states of stochastic models, which have $N$ states per site, in
matrix product form are considered. First we give a necessary condition for the
existence of a finite $M$-dimensional matrix product state for any ${N,M}$.
Second, we give a method to construct the matrices from the stationary states
of small size system when the above condition and $N\le M$ are satisfied.
Third, the method by which one can check that the obtained matrices are valid
for any system size is presented for the case where $M=N$ is satisfied. The
application of our methods is explained using three examples: the asymmetric
exclusion process, a model studied in [F. H. Jafarpour: J. Phys. A: Math. Gen.
36 (2003) 7497] and a hybrid of both of the models.
