  We study D0-branes in type IIA on $T^2$ with a background B-field turned on.
We calculate explicitly how the background B-field modifies the D0-brane
action. The effect of the B-field is to replace ordinary multiplication with a
noncommutative product. This enables us to find the matrix model for M-theory
on $T^2$ with a background 3-form potential along the torus and the lightlike
circle. This matrix model is exactly the non-local 2+1 dim SYM theory on a dual
$T^2$ proposed by Connes, Douglas and Schwarz. We calculate the radii and the
gauge coupling for the SYM on the dual $T^2$ for all choices of longitudinal
momentum and membrane wrapping number on the $T^2$.
