A rope of length $L$ and mass $M$ is hanging from a right support. The tension in the rope at a distance $x$ from the rigid support is
(a) $\mathrm{Mg}$
(b) $\left(\frac{L-x}{L}\right) M g$
(c) $\left(\frac{L}{L-x}\right) \mathrm{Mg}$
(d) $\frac{x}{L} M g$