Évariste Galois was born in 1811 and died in 1832 after being shot in the abdomen in a duel at the age of twenty.
Beginning in 1829 he composed multiple papers (and published one) on mathematics but was still denied entrance to the prestigious École Polytechnique, the leading French school of the time. He instead enrolled in the École Normale but was expelled after criticizing the school’s director for actions taken during a period of political unrest. His protests continued and he found himself imprisoned. Upon his release he was coaxed into a duel, supposedly over a love affair.
The night before his duel, convinced of his impending death, he stayed up all night pouring out his mathematical ideas in three manuscripts. The first laid out what would come to be known as Galois Theory, a condition for equations to be solved by racials. The second concerned finding roots of continuous functions, and the third concerned the study of finite fields (which would come to be known as Galois fields.
In Mastery, Robert Greene claims that his impending death was the impetus for Galois to focus on the task of leaving behind his mathematical ideas. Before this his studies had taken a backseat to his political activities but with the self-imposed deadline looming he was able to achieve clarity of thought and change the future of algebra.