In mathematics, more specifically algebra, abstract algebra or modern algebra is the study of algebraic structures.  Algebraic structures include groups, rings, fields, modules, vector spaces, lattices, and algebras over a field. The term abstract algebra was coined in the early 20th century to distinguish this area of study from older parts of algebra, and more specifically from elementary algebra, the use of variables to represent numbers in computation and reasoning.
Algebraic structures, with their associated homomorphisms, form mathematical categories. Category theory is a formalism that allows a unified way for expressing properties and constructions that are similar for various structures.
Universal algebra is a related subject that studies types of algebraic structures as single objects. For example, the structure of groups is a single object in universal algebra, which is called the variety of groups.
Before the nineteenth century, algebra was defined as the study of polynomials.  Abstract algebra came into existence during the nineteenth century as more complex problems and solution methods developed. Concrete problems and examples came from number theory, geometry, analysis, and the solutions of algebraic equations. Most theories that are now recognized as parts of abstract algebra started as collections of disparate facts from various branches of mathematics, acquired a common theme that served as a core around which various results were grouped, and finally became unified on a basis of a common set of concepts. This unification occurred in the early decades of the 20th century and resulted in the formal axiomatic definitions of various algebraic structures such as groups, rings, and fields.  This historical development is almost the opposite of the treatment found in popular textbooks, such as van der Waerden's Moderne Algebra,  which start each chapter with a formal definition of a structure and then follow it with concrete examples. 
The study of polynomial equations or algebraic equations has a long history. Circa 1700 BC, the Babylonians were able to solve quadratic equations specified as word problems. This word problem stage is classified as rhetorical algebra and was the dominant approach up to the 16th century. Muhammad ibn Mūsā al-Khwārizmī originated the word "algebra" in 830 AD, but his work was entirely rhetorical algebra. Fully symbolic algebra did not appear until François Viète's 1591 New Algebra, and even this had some spelled out words that were given symbols in Descartes's 1637 La Géométrie.  The formal study of solving symbolic equations led Leonhard Euler to accept what were then considered "nonsense" roots such as negative numbers and imaginary numbers, in the late 18th century.  However, European mathematicians, for the most part, resisted these concepts until the middle of the 19th century. 
George Peacock's 1830 Treatise of Algebra was the first attempt to place algebra on a strictly symbolic basis. He distinguished a new symbolical algebra, distinct from the old arithmetical algebra. Whereas in arithmetical algebra is restricted to , in symbolical algebra all rules of operations hold with no restrictions. Using this Peacock could show laws such as , by letting in . Peacock used what he termed the principle of the permanence of equivalent forms to justify his argument, but his reasoning suffered from the problem of induction.  For example, holds for the nonnegative real numbers, but not for general complex numbers.
Several areas of mathematics led to the study of groups. Lagrange's 1770 study of the solutions of the quintic led to the Galois group of a polynomial. Gauss's 1801 study of Fermat's little theorem led to the ring of integers modulo n, the multiplicative group of integers modulo n, and the more general concepts of cyclic groups and abelian groups. Klein's 1872 Erlangen program studied geometry and led to symmetry groups such as the Euclidean group and the group of projective transformations. In 1874 Lie introduced the theory of Lie groups, aiming for "the Galois theory of differential equations". In 1876 Poincaré and Klein introduced the group of Möbius transformations, and its subgroups such as the modular group and Fuchsian group, based on work on automorphic functions in analysis. 
The abstract concept of group emerged slowly over the middle of the nineteenth century. Galois in 1832 was the first to use the term “group”,  signifying a collection of permutations closed under composition.  Arthur Cayley's 1854 paper On the theory of groups defined a group as a set with an associative composition operation and the identity 1, today called a monoid.  In 1870 Kronecker defined an abstract binary operation that was closed, commutative, associative, and had the left cancellation property ,  similar to the modern laws for a finite abelian group.  Weber's 1882 definition of a group was a closed binary operation that was associative and had left and right cancellation.  Walther von Dyck in 1882 was the first to require inverse elements as part of the definition of a group. 
Once this abstract group concept emerged, results were reformulated in this abstract setting. For example, Sylow's theorem was reproven by Frobenius in 1887 directly from the laws of a finite group, although Frobenius remarked that the theorem followed from Cauchy's theorem on permutation groups and the fact that every finite group is a subgroup of a permutation group.   Otto Hölder was particularly prolific in this area, defining quotient groups in 1889, group automorphisms in 1893, as well as simple groups. He also completed the Jordan–Hölder theorem. Dedekind and Miller independently characterized Hamiltonian groups and introduced the notion of the commutator of two elements. Burnside, Frobenius, and Molien created the representation theory of finite groups at the end of the nineteenth century.  J. A. de Séguier's 1905 monograph Elements of the Theory of Abstract Groups presented many of these results in an abstract, general form, relegating "concrete" groups to an appendix, although it was limited to finite groups. The first monograph on both finite and infinite abstract groups was O. K. Schmidt's 1916 Abstract Theory of Groups. 
Noncommutative ring theory began with extensions of the complex numbers to hypercomplex numbers, specifically William Rowan Hamilton's quaternions in 1843. Many other number systems followed shortly. In 1844, Hamilton presented biquaternions, Cayley introduced octonions, and Grassman introduced exterior algebras.  James Cockle presented tessarines in 1848  and coquaternions in 1849.  William Kingdon Clifford introduced split-biquaternions in 1873. In addition Cayley introduced group algebras over the real and complex numbers in 1854 and square matrices in two papers of 1855 and 1858. 
Once there were sufficient examples, it remained to classify them. In an 1870 monograph, Benjamin Peirce classified the more than 150 hypercomplex number systems of dimension below 6, and gave an explicit definition of an associative algebra. He defined nilpotent and idempotent elements and proved that any algebra contains one or the other. He also defined the Peirce decomposition. Frobenius in 1878 and Charles Sanders Peirce in 1881 independently proved that the only finite-dimensional division algebras over were the real numbers, the complex numbers, and the quaternions. In the 1880s Killing and Cartan showed that semisimple Lie algebras could be decomposed into simple ones, and classified all simple Lie algebras. Inspired by this, in the 1890s Cartan, Frobenius, and Molien proved (independently) that a finite-dimensional associative algebra over or uniquely decomposes into the direct sums of a nilpotent algebra and a semisimple algebra that is the product of some number of simple algebras, square matrices over division algebras. Cartan was the first to define concepts such as direct sum and simple algebra, and these concepts proved quite influential. In 1907 Wedderburn extended Cartan's results to an arbitrary field, in what are now called the Wedderburn principal theorem and Artin–Wedderburn theorem. 
For commutative rings, several areas together led to commutative ring theory.  In two papers in 1828 and 1832, Gauss formulated the Gaussian integers and showed that they form a unique factorization domain (UFD) and proved the biquadratic reciprocity law. Jacobi and Eisenstein at around the same time proved a cubic reciprocity law for the Eisenstein integers.  The study of Fermat's last theorem led to the algebraic integers. In 1847, Gabriel Lamé thought he had proven FLT, but his proof was faulty as he assumed all the cyclotomic fields were UFDs, yet as Kummer pointed out, was not a UFD.  In 1846 and 1847 Kummer introduced ideal numbers and proved unique factorization into ideal primes for cyclotomic fields.  Dedekind extended this in 1871 to show that every nonzero ideal in the domain of integers of an algebraic number field is a unique product of prime ideals, a precursor of the theory of Dedekind domains. Overall, Dedekind's work created the subject of algebraic number theory. 
In the 1850s, Riemann introduced the fundamental concept of a Riemann surface. Riemann's methods relied on an assumption he called Dirichlet's principle,  which in 1870 was questioned by Weierstrass. Much later, in 1900, Hilbert justified Riemann's approach by developing the direct method in the calculus of variations.  In the 1860s and 1870s, Clebsch, Gordan, Brill, and especially M. Noether studied algebraic functions and curves. In particular, Noether studied what conditions were required for a polynomial to be an element of the ideal generated by two algebraic curves in the polynomial ring , although Noether did not use this modern language. In 1882 Dedekind and Weber, in analogy with Dedekind's earlier work on algebraic number theory, created a theory of algebraic function fields which allowed the first rigorous definition of a Riemann surface and a rigorous proof of the Riemann–Roch theorem. Kronecker in the 1880s, Hilbert in 1890, Lasker in 1905, and Macauley in 1913 further investigated the ideals of polynomial rings implicit in E. Noether's work. Lasker proved a special case of the Lasker-Noether theorem, namely that every ideal in a polynomial ring is a finite intersection of primary ideals. Macauley proved the uniqueness of this decomposition.  Overall, this work led to the development of algebraic geometry. 
In 1801 Gauss introduced binary quadratic forms over the integers and defined their equivalence. He further defined the discriminant of these forms, which is an invariant of a binary form. Between the 1860s and 1890s invariant theory developed and became a major field of algebra. Cayley, Sylvester, Gordan and others found the Jacobian and the Hessian for binary quartic forms and cubic forms.  In 1868 Gordan proved that the graded algebra of invariants of a binary form over the complex numbers was finitely generated, i.e., has a basis.  Hilbert wrote a thesis on invariants in 1885 and in 1890 showed that any form of any degree or number of variables has a basis. He extended this further in 1890 to Hilbert's basis theorem. 
Once these theories had been developed, it was still several decades until an abstract ring concept emerged. The first axiomatic definition was given by Abraham Fraenkel in 1914.  His definition was mainly the standard axioms: a set with two operations addition, which forms a group (not necessarily commutative), and multiplication, which is associative, distributes over addition, and has an identity element.  In addition, he had two axioms on "regular elements" inspired by work on the p-adic numbers, which excluded now-common rings such as the ring of integers. These allowed Fraenkel to prove that addition was commutative.  Fraenkel's work aimed to transfer Steinitz's 1910 definition of fields over to rings, but it was not connected with the existing work on concrete systems. Masazo Sono's 1917 definition was the first equivalent to the present one. 
In 1920, Emmy Noether, in collaboration with W. Schmeidler, published a paper about the theory of ideals in which they defined left and right ideals in a ring. The following year she published a landmark paper called Idealtheorie in Ringbereichen (Ideal theory in rings'), analyzing ascending chain conditions with regard to (mathematical) ideals. The publication gave rise to the term " Noetherian ring", and several other mathematical objects being called Noetherian.   Noted algebraist Irving Kaplansky called this work "revolutionary";  results which seemed inextricably connected to properties of polynomial rings were shown to follow from a single axiom.  Artin, inspired by Noether’s work, came up with the descending chain condition. These definitions marked the birth of abstract ring theory. 
In 1801 Gauss introduced the integers mod p, where p is a prime number. Galois extended this in 1830 to finite fields with elements.  In 1871 Richard Dedekind introduced, for a set of real or complex numbers that is closed under the four arithmetic operations,  the German word Körper, which means "body" or "corpus" (to suggest an organically closed entity). The English term "field" was introduced by Moore in 1893.  In 1881 Leopold Kronecker defined what he called a domain of rationality, which is a field of rational fractions in modern terms.  The first clear definition of an abstract field was due to Heinrich Martin Weber in 1893. It was missing the associative law for multiplication, but covered finite fields and the fields of algebraic number theory and algebraic geometry.  In 1910 Steinitz synthesized the knowledge of abstract field theory accumulated so far. He axiomatically defined fields with the modern definition, classified them by their characteristic, and proved many theorems commonly seen today. 
The end of the 19th and the beginning of the 20th century saw a shift in the methodology of mathematics. Abstract algebra emerged around the start of the 20th century, under the name modern algebra. Its study was part of the drive for more intellectual rigor in mathematics. Initially, the assumptions in classical algebra, on which the whole of mathematics (and major parts of the natural sciences) depend, took the form of axiomatic systems. No longer satisfied with establishing properties of concrete objects, mathematicians started to turn their attention to general theory. Formal definitions of certain algebraic structures began to emerge in the 19th century. For example, results about various groups of permutations came to be seen as instances of general theorems that concern a general notion of an abstract group. Questions of structure and classification of various mathematical objects came to forefront.
These processes were occurring throughout all of mathematics, but became especially pronounced in algebra. Formal definition through primitive operations and axioms were proposed for many basic algebraic structures, such as groups, rings, and fields. Hence such things as group theory and ring theory took their places in pure mathematics. The algebraic investigations of general fields by Ernst Steinitz and of commutative and then general rings by David Hilbert, Emil Artin and Emmy Noether, building up on the work of Ernst Kummer, Leopold Kronecker and Richard Dedekind, who had considered ideals in commutative rings, and of Georg Frobenius and Issai Schur, concerning representation theory of groups, came to define abstract algebra. These developments of the last quarter of the 19th century and the first quarter of 20th century were systematically exposed in Bartel van der Waerden's Moderne Algebra, the two-volume monograph published in 1930–1931 that forever changed for the mathematical world the meaning of the word algebra from the theory of equations to the theory of algebraic structures.
By abstracting away various amounts of detail, mathematicians have defined various algebraic structures that are used in many areas of mathematics. For instance, almost all systems studied are sets, to which the theorems of set theory apply. Those sets that have a certain binary operation defined on them form magmas, to which the concepts concerning magmas, as well those concerning sets, apply. We can add additional constraints on the algebraic structure, such as associativity (to form semigroups); identity, and inverses (to form groups); and other more complex structures. With additional structure, more theorems could be proved, but the generality is reduced. The "hierarchy" of algebraic objects (in terms of generality) creates a hierarchy of the corresponding theories: for instance, the theorems of group theory may be used when studying rings (algebraic objects that have two binary operations with certain axioms) since a ring is a group over one of its operations. In general there is a balance between the amount of generality and the richness of the theory: more general structures have usually fewer nontrivial theorems and fewer applications.
Examples of algebraic structures with a single binary operation are:
Examples involving several operations include:
A group is a set together with a "group product", a binary operation . The group satisfies the following defining axioms:
Identity: there exists an element such that, for each element in , it holds that .
Inverse: for each element of , there exists an element so that .
Associativity: for each triplet of elements in , it holds that .
A ring is a set together with two binary operations, addition: and multiplication: . Additionally, satisfies the following defining axioms:
Addition: is a commutative group under addition.
Multiplication: is a monoid under multiplication.
Distributive: Multiplication is distributive with respect to addition.
Because of its generality, abstract algebra is used in many fields of mathematics and science. For instance, algebraic topology uses algebraic objects to study topologies. The Poincaré conjecture, proved in 2003, asserts that the fundamental group of a manifold, which encodes information about connectedness, can be used to determine whether a manifold is a sphere or not. Algebraic number theory studies various number rings that generalize the set of integers. Using tools of algebraic number theory, Andrew Wiles proved Fermat's Last Theorem.
In physics, groups are used to represent symmetry operations, and the usage of group theory could simplify differential equations. In gauge theory, the requirement of local symmetry can be used to deduce the equations describing a system. The groups that describe those symmetries are Lie groups, and the study of Lie groups and Lie algebras reveals much about the physical system; for instance, the number of force carriers in a theory is equal to the dimension of the Lie algebra, and these bosons interact with the force they mediate if the Lie algebra is nonabelian. 
Much of our study of abstract algebra involves an analysis of structures and their operations