Ernst Mach was born in Chrlice, (part of Brno today), in the Austrian empire. His father, who had graduated from Prague University, acted as tutor to the noble Brethon family in Zlín, eastern Moravia. Up to the age of 14, Mach received his education at home from his parents. He then entered a Gymnasium in Kroměříž, where he studied for three years. In 1855 he became a student at the University of Vienna. There he studied physics and for one semester medical physiology, receiving his doctorate in physics in 1860 and his Habilitation the following year.
His early work focused on the Doppler effect in optics and acoustics. In 1864 he took a job as Professor of Mathematics in Graz, having turned down the position of a chair in surgery at the University of Salzburg to do so, and in 1866 he was appointed as Professor of Physics. During that period, Mach continued his work in psycho-physics and in sensory perception. In 1867, he took the chair of Professor of Experimental Physics at Charles-Ferdinand University, Prague, where he stayed for 28 years.
Mach's main contribution to physics involved his description and photographs of spark shock-waves and then ballistic shock-waves. He described how when a bullet or shell moved faster than the speed of sound, it created a compression of air in front it. Using schlieren photography, he and his son Ludwig were able to photograph the shadows of the invisible shock waves. During the early 1890s Ludwig was able to invent an interferometer which allowed for much clearer photographs. But Mach also made many contributions to psychology and physiology, including his anticipation of gestalt phenomena, his discovery of Mach bands, an inhibition-influenced type of visual illusion, and especially his discovery of a non-acoustic function of the inner ear which helped control human balance.
Mach also became well-known for his philosophy, a type of phenomenalism recognizing only sensations as real. This position seemed incompatible with the view of atoms and molecules as external, mind-independent things, and from about 1908 to 1911 Mach's reluctance to acknowledge the reality of atoms was criticized by Max Planck as being incompatible with physics. Some of Mach's criticisms of Newton's position on space and time influenced Einstein, but later Einstein realized that Mach was basically opposed to Newton's philosophy and concluded that his physical criticism was not sound. One of the best-known of Mach's ideas is the so-called "Mach's principle," concerning the physical origin of inertia. This was never written down by Mach, but was given a graphic verbal form, attributed by Philipp Frank to Mach himself, as, "When the subway jerks, it's the fixed stars that throw you down."
Most of Mach's initial studies in the field of experimental physics concentrated on the interference, diffraction, polarization and refraction of light in different media under external influences. There followed his important explorations in the field of supersonic velocity. Mach's paper on this subject was published in 1877 and correctly describes the sound effects observed during the supersonic motion of a projectile. Mach deduced and experimentally confirmed the existence of a shock wave which has the form of a cone with the projectile at the apex. The ratio of the speed of projectile to the speed of sound vp/vs is now called the Mach number. It plays a crucial role in aerodynamics and hydrodynamics. He also contributed to cosmology the hypothesis known as Mach's principle.
In 1898 Mach suffered from cardiac arrest and in 1901 retired from the University of Vienna. On leaving Vienna in 1913 he moved to his son's home in Vaterstetten, near Munich, where he continued writing and corresponding until his death in 1916.