Help with a proof - divisor of a linear combination

Hi guys.

The teacher in our class made some claim and didn't prove it for some reason, and I really want to see the proof for that.

let $\displaystyle n,m,d\in \mathbb{Z}$.

if $\displaystyle d|n$ and $\displaystyle d|m$ then $\displaystyle d|(am+bn)$ for every $\displaystyle a,b\in\mathbb{Z}$.

thanks in advanced.

Re: Help with a proof - divisor of a linear combination

$\displaystyle d|n$ means $\displaystyle n = dx$ for some $\displaystyle x \in \mathbb{Z}$. $\displaystyle d|m$ means $\displaystyle m = dy$ for some $\displaystyle y \in \mathbb{Z}$. So, $\displaystyle am+bn = a(dy) + b(dx) = d(ay+bx)$. Since $\displaystyle ay+bx \in \mathbb{Z}$, $\displaystyle am+bn$ is divisible by $\displaystyle d$.