It is shown that the related questions of output tracking and output regulation (with and without input sensor measurement), all with associated internal stability, can be resolved via a single polynomial matrix formulation which employs the recently developed notion of skew prime polynomial matrices. In particular, the primary condition which must be satisfied in all cases is that

, the plant numerator matrix, and a matrix where zeros represent the modes of the exogenous system, be externally skew prime. This observation is then elucidated in light of a new internal model principle.