In 1887, inventor Elisha Gray, who lost the patent for the telephone to Alexander Graham Bell, invented the first fax machine, using telegraph lines to transmit handwriting and documents.