Borax and boric acid are not the same compound; borax is a salt of boric acid. The less common chemical names of the substances make it clear that these are two entirely different chemical compounds; borax is sodium borate, while boric acid is hydrogen borate. Because both compounds share a use as relatively safe chemical insecticides, their names are often used interchangeably in layman's terms.
Boric acid and borax are both best known as low-toxicity pesticides used in homes. Neither chemical is toxic to humans nor pets when used as recommended, and neither chemical has been shown to contribute to cancer or other long-term illnesses. As a result, these compounds are used as natural and safe ways to combat ants and other pests.
Borax is also used in soap and laundry detergent, welding flux, tooth bleach and water softeners, while boric acid is used in food preservation, tanning, industrial lubrication and as a medical antiseptic. Their disparate uses also make it clear that they are two separate chemicals. When shopping for one, do not accidentally buy the other, unless the only use is as an insecticide. Another reason these compounds are sometimes confused is that boric acid is a precursor to borax, but this reaction is not something that occurs in the home; it is an industrial reaction used in the production of borax.