The fax machine was invented by Alexander Bain, who devised the first fax machine and received a British patent for it on May 27, 1843. His invention, called the "electric printing telegraph," was the first to use electronic signals to scan documents and reproduce them in other locations. Although it did not gain much popularity at the time, this invention laid the foundation for future fax technology developments.