Mathematics & Logic · Depth 2 · Introductory · 5 min read

Algebra

Using letters for unknown or changing numbers and solving equations step by step: a subject named after a treatise by al-Khwarizmi.

On this page
  1. What is algebra?
  2. How solving works
  3. The math (optional): worked examples
  4. Functions
  5. History
  6. Common misconceptions
  7. Going further
  8. Real-life examples
  9. Evidence & sources

What is algebra?

Algebra lets letters stand in for numbers. A variable is a letter that represents a number or quantity whose value may change, while a constant is a number whose value always stays the same.[1]

Numbers, variables and operation symbols combine into an expression, such as g + 3.[1] Join two expressions with an equal sign and you have an equation.[1]

Historians describe algebra as a unifying theory: it let rational numbers, irrational numbers and geometric magnitudes all be treated as “algebraic objects”.[9] Quadratic equations alone are used in countless ways in engineering, architecture, finance and biological science.[3]

A note on notation: this page follows the OpenStax textbooks. x2 means x × x, and ± means “plus or minus”, which gives two answers.

How solving works

The basic rule is balance: you may add, subtract, multiply or divide an equation by a number or an expression, as long as you do the same to both sides, and you can never divide by zero.[2]

A linear equation in one variable is one that can be written as ax + b = 0, where a and b are real numbers and a is not zero.[2]

A quadratic equation contains a second-degree polynomial, as in x2 − 4 = 0.[3] Methods include factoring and completing the square, and the quadratic formula solves all quadratic equations.[3] For ax2 + bx + c = 0 with a ≠ 0, it reads x = (−b ± √(b2 − 4ac)) ÷ 2a, and it can be derived by completing the square.[3] The quantity b2 − 4ac, the discriminant, tells you whether the solutions are real or complex numbers; when it is negative, there are two complex solutions.[3]

The fundamental theorem of algebra states that every polynomial equation of degree n with complex coefficients has n roots in the complex numbers.[14] (A theorem is a proved result, unlike a definition, which is chosen.)

The math (optional): worked examples

A linear equation. For 5x + 2 = 3x − 6, gathering the x terms on one side and the numbers on the other gives 2x = −8, so x = −4.[2] (Check: with x = −4, both sides equal −18.)

Completing the square. For x2 + 4x + 1 = 0, move the 1 across and add 4 to both sides: x2 + 4x + 4 = 3.[3] The left side is the perfect square (x + 2)2, so the solutions are −2 + √3 and −2 − √3.[3]

Al-Khwarizmi’s way. One of his standard forms is “squares and roots equal to numbers”, for example x2 + 10x = 39.[7] He takes half of the 10 roots, which is 5, multiplies it by itself to get 25, and adds 39 to get 64.[7] The square root of 64 is 8, and taking away 5 leaves 3.[7] (x = −13 also works, since 169 − 130 = 39.) Early studies of equations by al-Khwarizmi allowed only positive real roots.[14]

Functions

A function is a relation in which each input value leads to exactly one output value.[4] It is written y = f(x), read “y is a function of x”.[4] A linear function has a straight-line graph and can be written f(x) = mx + b.[5]

History

It is often claimed that the Babylonians (about 1800 BC) first solved quadratic equations; MacTutor calls this an oversimplification, since they had no notion of an equation, though their method was essentially completing the square.[10]

Diophantus, often called the “father of algebra”, is best known for his Arithmetica, but essentially nothing is known of his life, and when he lived is debated.[11] MacTutor quotes Vogel as saying that Diophantus took a fundamental step from verbal algebra towards symbolic algebra.[11] In India, Brahmagupta wrote his Brahmasphutasiddhanta in 628 and gave an almost modern method for quadratics that admits negative quantities.[12, 10]

Al-Khwarizmi, a scholar at the House of Wisdom in Baghdad, wrote the treatise that gave algebra its name.[7] Al-jabr means “completion”, removing negative terms, and al-muqabala means “balancing”.[7] He wrote entirely in words, even the numbers.[7, 8] The historian Gandz, quoted by MacTutor, argued that al-Khwarizmi “is more entitled to be called ‘the father of algebra’ than Diophantus”.[7]

In 1145, Abraham bar Hiyya’s Liber embadorum became the first book published in Europe to give the complete solution of the quadratic equation.[10] Formulas for cubic (third-degree) equations could produce square roots of negative numbers: for x3 = 15x + 4, the formula gave an answer involving √−121, yet Cardan knew that x = 4 was a solution.[14]

Symbols came late. Viète introduced the first systematic algebraic notation in 1591, using vowels for unknowns and consonants for known quantities.[13] The modern convention, with letters near the start of the alphabet for known quantities and letters near the end for unknowns, was introduced later by Descartes in La Géométrie.[13]

Common misconceptions

“Every equation has exactly one answer.” An identity such as 3x = 2x + x is true for all values of x, while 5x − 15 = 5(x − 4) leads to the false statement −15 = −20 and has no solution.[2]

“f(x) means f times x.” In function notation the parentheses show what goes into the function; they do not indicate multiplication.[4]

“Negative answers were always accepted.” Diophantus called the equation 4 = 4x + 20 absurd, because it would lead to a meaningless answer.[11]

Going further

On this map, algebra leads on to Calculus, which studies how functions change, and meets Geometry through coordinates. The free OpenStax College Algebra textbook works through every method above.

Real-life examples

  • Two birthdays, one letter

    Greg is 20 and Alex, who shares his birthday, is 23. Call Greg's age g, and Alex's age can be written g + 3.[1]

  • Saving for a trip

    A student earns $15.00 an hour and opens a savings account with $400. How many hours must she work to pay for a trip costing about $2,500? A textbook uses this question to introduce linear equations.[2]

  • Laying out a garden

    A garden is 10 feet longer than it is wide and has an area of 119 square feet. Finding its width and length means setting up and solving a quadratic equation.[3] Quadratics often model problems about area.[6]

  • A train leaving the station

    A train that starts 250 meters from the station and adds 83 meters every second has a distance that grows by the same amount each second, the pattern of a linear function.[5]

Connected across the map

Learn more

Short descriptions are our own summaries. The resources belong to, and are run by, their publishers.

Evidence & sources

Level 1 · Established

Supported by extensive evidence and broad scientific consensus.

Why this level? Solving linear and quadratic equations is standard, long-settled mathematics, explained here from peer-reviewed OpenStax textbooks. The history comes from the MacTutor archive (University of St Andrews) and University of Kentucky course notes, and dates the sources disagree on are attributed.

This is a Knowledge Atlas editorial classification of the sources we could find, not a certificate of truth. How we evaluate knowledge

Sources

Based on 14 sources from 3 institutions: OpenStax, MacTutor, Univ. of Kentucky Math.

Show all 14 sourcesHide the list
  1. ScholarlyOpenStax (Rice University)· Academic publisherPrealgebra 2e, 2.1 Use the Language of AlgebraOpened and checked against this page on 29 Sept 2026 · License: CC BY-NC-SA 4.0
  2. ScholarlyOpenStax (Rice University)· Academic publisherCollege Algebra 2e, 2.2 Linear Equations in One VariableOpened and checked against this page on 29 Sept 2026 · License: CC BY-NC-SA 4.0
  3. ScholarlyOpenStax (Rice University)· Academic publisherCollege Algebra 2e, 2.5 Quadratic EquationsOpened and checked against this page on 29 Sept 2026 · License: CC BY-NC-SA 4.0
  4. ScholarlyOpenStax (Rice University)· Academic publisherCollege Algebra 2e, 3.1 Functions and Function NotationOpened and checked against this page on 29 Sept 2026 · License: CC BY-NC-SA 4.0
  5. ScholarlyOpenStax (Rice University)· Academic publisherCollege Algebra 2e, 4.1 Linear FunctionsOpened and checked against this page on 29 Sept 2026 · License: CC BY-NC-SA 4.0
  6. ScholarlyOpenStax (Rice University)· Academic publisherCollege Algebra 2e, 5.1 Quadratic FunctionsOpened and checked against this page on 29 Sept 2026 · License: CC BY-NC-SA 4.0
  7. ScholarlyMacTutor History of Mathematics (University of St Andrews)· UniversityAl-Khwarizmi (790 - 850) - BiographyOpened and checked against this page on 29 Sept 2026
  8. ReliableUniversity of Kentucky, Department of Mathematics (course notes)· UniversityPart 1: Al-Khwarizmi, Quadratic Equations, and the Birth of Algebra (course notes, PDF)Opened and checked against this page on 29 Sept 2026
  9. ScholarlyMacTutor History of Mathematics (University of St Andrews)· UniversityArabic mathematicsOpened and checked against this page on 29 Sept 2026
  10. ScholarlyMacTutor History of Mathematics (University of St Andrews)· UniversityQuadratic, cubic and quartic equationsOpened and checked against this page on 29 Sept 2026
  11. ScholarlyMacTutor History of Mathematics (University of St Andrews)· UniversityDiophantus (200 - 284) - BiographyOpened and checked against this page on 29 Sept 2026
  12. ScholarlyMacTutor History of Mathematics (University of St Andrews)· UniversityBrahmagupta (598 - 670) - BiographyOpened and checked against this page on 29 Sept 2026
  13. ScholarlyMacTutor History of Mathematics (University of St Andrews)· UniversityFrancois VieteOpened and checked against this page on 29 Sept 2026
  14. ScholarlyMacTutor History of Mathematics (University of St Andrews)· UniversityThe fundamental theorem of algebraOpened and checked against this page on 29 Sept 2026