MacMahon was educated at a school in Cheltenham and was always destined for a military career. In February 1871 he entered the Royal Military Academy at Woolwich as a gentleman cadet, and in the following year he became a Lieutenant. After his education at Woolwich, he served in India for five years beginning in 1873; first in Madras, then Lucknow, then Sinapore. He was with the Royal Artillery's No 1 Mountain Battery on the North West Frontier of the British Indian Empire when, on 9 August 1877, he took ill a few weeks before his unit went into battle. In 1878 he was sent home to England where it took him eighteen months to recover his health.
Promoted to Captain in 1881, he was appointed as Instructor in Mathematics at the Royal Military Academy in the following year. He held this post until 1888 when he became Assistant Inspector at the Arsenal. Three years later he was appointed as Instructor in Physics at the Artillery College, being promoted to Professor of Physics there before he retired from the Army in 1898. In fact he had suffered a great disappointment in the previous year when he was a candidate for the Savilian Chair of Geometry at Oxford.
Sylvester, who held the Savilian Chair of Geometry, died in March 1897. For three years before that his eyesight had been failing and William Esson, who had been a mathematics tutor at Merton College, had acted as his deputy. MacMahon was a candidate to fill the vacant Savilian Chair, as was Esson, and after Esson was appointed MacMahon wrote to Sir Joseph Larmor expressing his feelings at losing out to Esson. He claimed, with justification, that Esson was not even worthy of being a candidate let alone being appointed. Esson had no record of mathematical research and even his interests in reforming the teaching of mathematics at Oxford seemed to vanish after his appointment as Savilian professor. One would have to say that MacMahon was fully justified in feeling aggrieved at losing out to Esson.
Before he was a candidate for the Savilian Chair of Geometry, MacMahon had been elected a Fellow of the Royal Society in 1890. He had joined the London Mathematical Society in 1883 and served as its President from 1894-96 before taking on a number of different roles. In 1901 he served as President of Section A of the British Association for its meeting in Glasgow then, from 1902 to 1914, he was one of the Secretaries to the British Association. From 1906 to 1920 he served as Deputy Warden of the Standards of the Board of Trade.
His roles were not only many in number but also varied in nature. He was elected to the Royal Astronomical Society in 1879, was its President in 1917 and also served on the Council of the Royal Society of Arts. He was appointed as a Governor of Winchester College.
It was Alfred George Greenhill who taught MacMahon at the Royal Military Academy at Woolwich and Greenhill's interests at that time had a large influence on MacMahon's early work. Greenhill was trying to construct a model of the trajectory of a missile based on experiments which suggested that the resistance varies as the cube of the velocity. In 1884 MacMahon calculated a table of values based on Greenhill's model. He then published his own original work on an extension of Allegret's problem.
MacMahon then worked on invariants of binary quartic forms, following Cayley and Sylvester. He gave a 1-1 correspondence between semi-invariants and symmetric functions which excited both Cayley and Sylvester. In fact Cayley began one of his own papers with the words:-
A very remarkable discovery in the theory of semi-invariants has been recently made by Captain MacMahon ...This study of symmetric functions led MacMahon to study partitions and Latin squares, and for many years he was considered the leading worker in this area. His published values of the number of unrestricted partitions of the first 200 integers which proved extremely useful to Hardy and Littlewood in their own work on partitions. He gave a Presidential Address to the London Mathematical Society on combinatorial analysis in 1894. MacMahon wrote a two volume treatise Combinatory analysis (volume one in 1915 and the second volume in the following year) which has become a classic. He wrote An introduction to combinatory analysis in 1920. In 1921 he wrote New Mathematical Pastimes, a book on mathematical recreations. This book shows another of the topics which fascinated MacMahon, namely the construction of patterns which can be repeated to fill the plane. However he wrote in the Preface:-
It has not been found possible to produce the book in colour ...which greatly saddened him.
MacMahon was well respected in his day. For example he was described by a Member of Parliament in 1909 as:-
... one of the leading mathematicians of our day.He was an accomplished billiard player and a congenial host. In  89 of his publications are listed.
Baker, in , describes his personality:-
His absorption in the mathematical problems he was considering, which was noticeable in his Woolwich days, became more pronounced in later life; but another trait, also noticeable at Woolwich, was manifest to the end, namely, his formal kind courtesy towards all with whom he had dealings; and he had always a desire to know the names of the more distinguished younger mathematicians, and to get some idea of the work they were doing. Many of his friends will always remember his personal cordiality, in which he was so ably assisted by his wife.MacMahon received many honours. In particular he was awarded honorary degrees by Trinity College, Dublin (1897), Cambridge (1904), Aberdeen (1911) and St Andrews (1911). He also won numerous medals: the Royal Medal of the Royal Society(1900), the Sylvester Medal of the Royal Society (1919), and the De Morgan Medal from the London Mathematical Society (1923).
Article by: J J O'Connor and E F Robertson