Skip to main content
Home
plus.maths.org

Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Main navigation

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • For

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

    Popular topics and tags

    Shapes

    • Geometry
    • Vectors and matrices
    • Topology
    • Networks and graph theory
    • Fractals

    Numbers

    • Number theory
    • Arithmetic
    • Prime numbers
    • Fermat's last theorem
    • Cryptography

    Computing and information

    • Quantum computing
    • Complexity
    • Information theory
    • Artificial intelligence and machine learning
    • Algorithm

    Data and probability

    • Statistics
    • Probability and uncertainty
    • Randomness

    Abstract structures

    • Symmetry
    • Algebra and group theory
    • Vectors and matrices

    Physics

    • Fluid dynamics
    • Quantum physics
    • General relativity, gravity and black holes
    • Entropy and thermodynamics
    • String theory and quantum gravity

    Arts, humanities and sport

    • History and philosophy of mathematics
    • Art and Music
    • Language
    • Sport

    Logic, proof and strategy

    • Logic
    • Proof
    • Game theory

    Calculus and analysis

    • Differential equations
    • Calculus

    Towards applications

    • Mathematical modelling
    • Dynamical systems and Chaos

    Applications

    • Medicine and health
    • Epidemiology
    • Biology
    • Economics and finance
    • Engineering and architecture
    • Weather forecasting
    • Climate change

    Understanding of mathematics

    • Public understanding of mathematics
    • Education

    Get your maths quickly

    • Maths in a minute

    Main menu

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • Audiences

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

    Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Maths in a minute: Algorithms

    21 November, 2023

    The word "algorithm" has probably got more usage over the last few years than it has in its entire history. It is often associated with artificial intelligence and sometimes comes with a bit of a scary undertone. But what exactly is an algorithm?

    The word itself is derived from the name of a person, the mathematician, astronomer and general polymath Muḥammad ibn Mūsā al-Khwārizmī who lived around the turn of the 9th century. When some of his books were translated in the 12th century, his name was Latinised to "alghoarismi "or "algorismi" — and that's where the word "algorithm" comes from.

    book page

    A page from al-Khwārizmī's book Algebra.

    An algorithm is simply a list of instructions that enable you to complete a task. A detailed cooking recipe is an algorithm, and so are (or at least should be) instructions to put together flatpack furniture. In maths terms, long division is an algorithm that enables you to divide one number by another, and the sieve of Eratosthenes is an algorithm for finding prime numbers.

    Algorithms have been around ever since people have been able to communicate lists of instructions to each other, but they've really come into their own in the age of computers. When we communicate instructions to fellow humans, we often leave out things we consider obvious — for example, if a cooking recipe requires eggs, we don't normally specify that the eggs need to be broken. No human in their right mind would put unbroken eggs into a cake. Computers, however, do not have the brains or life experience to infer what's obvious, so a computer program has to be a water tight algorithm where every single step is clearly defined.

    When we talk about algorithms today, it's usually computer programs we mean. A small number of these programs involve something called machine learning, or specifically deep learning. In this case an algorithm (which is still a clear list of instructions) adjusts itself in response to data sets it has been shown so it develops the ability to spot patterns in data that humans might find hard to spot. It can then apply this ability to other data sets to make predictions or generate outputs, such as a suggestion for someone's online shopping.

    Machine learning is so surprisingly powerful that people think of it as a form of artificial intelligence — it's what powers the large language models that give us things like ChatGTP and it's also behind other forms of generative AI (along with more mundane things such as online shopping suggestions).

    Coming back to the general notion of an algorithm though, it doesn't have to be sophisticated or scary. It can literally just be about making an omlette.


    Further reading

    To find out more about machine learning, see

    • Maths in a minute: Machine learning and neural networks
    • What is machine learning?
    • Maths in a minute: Deep learning
    • All our content on machine learning

    For some lovely examples of some other types of algorithm, see

    • Sundaram's sieve
    • Happy birthday Quicksort!
    • The power of ants

    This article was produced as part of our collaboration with the Isaac Newton Institute for Mathematical Sciences (INI) – you can find all the content from the collaboration here.

    The INI is an international research centre and our neighbour here on the University of Cambridge's maths campus. It attracts leading mathematical scientists from all over the world, and is open to all. Visit www.newton.ac.uk to find out more.

    INI logo

    • Log in or register to post comments

    Read more about...

    INI
    Maths in a minute
    algorithm
    artificial intelligence
    machine learning
    maths4DL

    Our Podcast: Maths on the Move

    Our Maths on the Move podcast brings you the latest news from the world of maths, plus interviews and discussions with leading mathematicians and scientists about the maths that is changing our lives.

    Apple Podcasts
    Spotify
    Podbean

    Plus delivered to you

    Keep up to date with Plus by subscribing to our newsletter or following Plus on X or Bluesky.

    University of Cambridge logo

    Plus is part of the family of activities in the Millennium Mathematics Project.
    Copyright © 1997 - 2025. University of Cambridge. All rights reserved.

    Terms