In astronomy, a contact binary is a binary star system whose component stars are so close that they touch each other or have merged to share their gaseous envelopes. A binary system whose stars share an envelope may also be called an overcontact binary. Almost all known contact binary systems are eclipsing binaries; eclipsing contact binaries are known as W Ursae Majoris variables, after their type star, W Ursae Majoris.