Do Dogs use their tail for balance?

I sometimes watch my Chihuahua use his tail. It curls up over his back when he’s really happy. Sometimes he holds it out straight. Or tucked between the legs when upset.

I swear it looks like he uses it for balance walking along the edge of our deck. Or on the edge of the bed.

Any research on dogs doing this?

What about dogs with docked tails? Or bulldogs, Bostons, and Frenchies born without them? I never see my Boston hold her stub tail out or to the side. Does she have less balance? She does wag it sometimes. Nothing cuter than that stub tail going a mile a minute.

Google finds ask.com, yahoo questions etc. on tails. Not really any legitimate sources. Seems pretty divided if tails are used for balance or not.

Found this article on docking. Not sure if this Wansborough guy is an animal rights activist or a legit researcher.

I remember seeing a video of a dog that had lost two legs - front right, and hind left. It learned to walk (and run) again, twirling it’s tail to act as a counterweight. The video was quite amazing in slow motion.

If my golden retriever trips or is in a precarious position, she appears to use her tail to help with balance in the exact same way a person would hold out and “twirl” their arms to right themselves.