  We study the M(atrix) theory which describes the $E_8 \times E_8$ heterotic
string compactified on $S^1$, or equivalently M-theory compactified on an
orbifold $(S^1/\integer_2) \times S^1$, in the presence of a Wilson line. We
formulate the corresponding M(atrix) gauge theory, which lives on a dual
orbifold $S^1 \times (S^1 / \integer_2)$. Thirty-two real chiral fermions must
be introduced to cancel gauge anomalies. In the absence of an $E_8 \times E_8$
Wilson line, these fermions are symmetrically localized on the orbifold
boundaries. Turning on the Wilson line moves these fermions into the interior
of the orbifold. The M(atrix) theory action is uniquely determined by gauge and
supersymmetry anomaly cancellation in 2+1 dimensions. The action consistently
incorporates the massive IIA supergravity background into M(atrix) theory by
explicitly breaking (2+1)-dimensional Poincare invariance. The BPS excitations
of M(atrix) theory are identified and compared to the heterotic string. We find
that heterotic T-duality is realized as electric-magnetic S-duality in M(atrix)
theory.
