Copyright

What is an Algorithm? - Definition & Examples Video

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Using Algorithms to Solve Math Problems

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
 Replay
Your next lesson will play in 10 seconds
  • 0:04 What Is an Algorithm?
  • 0:36 A Real Life Algorithm
  • 1:20 Example in Math &…
  • 2:25 Writing an Algorithm
  • 3:45 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Timeline
Autoplay
Autoplay
Speed Speed

Recommended Lessons and Courses for You

Lesson Transcript
Instructor: Peter Kosek

Peter has taught Mathematics at the college level and has a master's degree in Mathematics.

Algorithms are everywhere. Computers use them, your friends use them, even you use them. Learn more about what algorithms are, as well as create some algorithms of your own.

What Is an Algorithm?

An algorithm is a finite list of instructions, most often used in solving problems or performing tasks. You may have heard the term used in some fancy context about a genius using an algorithm to do something highly complex, usually in programming. Indeed, you've most likely heard the term used to explain most things related to computer processes. However, what would you say if I was to tell you that there is a very good chance that you, yourself, have followed an algorithm? You may have followed some algorithms hundreds or thousands of times!

A Real Life Algorithm

Have you ever baked or cooked something? One of the most obvious examples of an algorithm is a recipe. It's a finite list of instructions used to perform a task. For example, if you were to follow the algorithm to create brownies from a box mix, you would follow the three to five step process written on the back of the box.

One of the attributes of an algorithm is that, since it is a list of instructions, there is some step-by-step process that occurs in order. Very often, the order that the steps are given in can make a big difference. Suppose we were to reorder the steps of the recipe on the back of the brownie box and told somebody to put the brownies in the oven for 22 minutes before we told them to preheat the oven. That would be silly! That's why the ordering of the steps is very important.

Example in Math & Computer Science

One of the most common uses for algorithms is in computer science. Computers can't do anything without being told what to do. Algorithms allow us to give computers step-by-step instructions in order to solve a problem or perform a task. For example, let's consider the following algorithm:

For each odd number from 1 to 9, multiply it by 2 and add 7 to it. Then, write out the results as a list separated by commas.

How would we start to follow this algorithm? Well, it first says that for each odd number from 1 to 9, multiply it by 2 and add 7 to it. Remember, we need to follow the steps in the order they are given. We first start out with the first odd number, which is 1. Let's multiply it by 2 and then add 7 to get 9. Then, we go to the next odd number, 3. Let's multiply it by 2 and add 7 to get 13. We repeat this process for 5, 7, and 9. Once we finish that, we want to write out the results as a list separated by commas. Therefore, our final output is 9, 13, 17, 21, 25.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account
Support