CommunityPlumbing Pipe Noise: Causes are expansion and water hammer

Plumbing Pipe Noise: Causes are expansion and water hammer

Why are my plumbing pipes in the wall making a knocking sound after I have turned on the hot water in the bathtub?

The Money Pit Answer

There are two common causes of plumbing pipe noise. The first is expansion and the second is what is known as water hammer. Because your noise occurs only when running hot water, the culprit is probably expansion. If a copper pipe is not snugly attached to the wood studs in your wall, it rubs on the wood as it expands. This can create a sound described as a knock, bang or even a drip. 
The other plumbing pipe noise, water hammer, occurs when the faucet is turned off.  Water is very heavy (about 8 pounds per gallon) and as it runs through the pipes it picks up speed and a centrifugal force that shakes the pipe when it is turned off. The solution is to better secure the pipe to the framing and also to install a water hammer arrestor (pictured above), which is basically a shock absorber for your plumbing system.
The good news is that while both of these plumbing pipe noises are annoying, they rarely cause any plumbing damage.