Nepedia
Back to Discover
Independent Reader
🔢

Recursion

math Maturity 7-9 Next article →

Imagine a tiny doll inside a larger doll.

First matryoshka museum doll open
First matryoshka museum doll open

Each doll holds a smaller version of itself. This idea is called recursion. Recursion happens when a rule or a step uses itself to work.

Droste Cacao Alcalinise blikje, foto4
Droste Cacao Alcalinise blikje, foto4

You can see this in art. One image might show a person holding a box. That box shows the same person holding the same box. This can create a loop that looks like it never ends.

To keep things from going on forever, recursion needs a stop. We call this a base case. A base case is a simple step that does not use recursion. Without it, a process might loop forever.

Sierpinski triangle
Sierpinski triangle

In math, recursion can build complex patterns. For example, the Fibonacci sequence uses recursion to find numbers. It uses the two numbers before it to find the next one. Recursion is also used in computer science and language. It helps us understand how sentences can grow very long. It even helps create beautiful shapes called fractals.

161 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (7)
File:Droste Cacao Alcalinise blikje, foto4.JPG
Droste Cacao Alcalinise blikje, foto4.JPG
File:Serpiente alquimica.jpg
Serpiente alquimica.jpg
File:Mixing Sourdough starter into the flour.jpg
Mixing Sourdough starter into the flour.jpg
File:Toronto recursive history plaque.jpg
Toronto recursive history plaque.jpg
File:Sierpinski triangle.svg
Sierpinski triangle.svg
File:First matryoshka museum doll open.jpg
First matryoshka museum doll open.jpg
File:Giotto. The Stefaneschi Triptych (verso) c.1330 220x245cm. Pinacoteca, Vatican..jpg
Giotto. The Stefaneschi Triptych (verso)...
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.