Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

What is the difference between the terms formula and algorithm in mathematics? I haven't seen the definition of formula anywhere. I know that algorithm means that Turing machine halts for every input. Is for example

$$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$ formula or algorithm as $\pm$ means you can choose which sign you use? Are there any formulas that are not algorithms or algorithms that are not formulas?

share|improve this question
    
I don't remember anything called formula in formal mathematics. I think algorithm is metalanguage term. algorithm tells a computer or a person how to do something. Pure mathematics, I think, never tells how to do something! –  user59671 Mar 14 '13 at 20:18
    
@CutieKrait There are plenty of algorithms and formulas in pure mathematics. –  Alexander Gruber Mar 14 '13 at 20:25
    
@AlexanderGruber: yep. But probably these are better terms: formula = equality, and algorithm = proof. –  user59671 Mar 14 '13 at 20:33
    
@CutieKrait No, that is not correct. –  Alexander Gruber Mar 14 '13 at 20:37
    
however these are wolfram definitions: wolframalpha.com/input/?i=formula : wolframalpha.com/input/?i=algorithm –  user59671 Mar 14 '13 at 20:48
show 1 more comment

2 Answers

up vote 4 down vote accepted

An algorithm is in its most general definition: a way of achieving a desired goal. Formula are merely recipes or components.

Example: The actual method of baking bread with steps is an algorithm:

  1. get ingredients
  2. mix ingredients
  3. put in oven
  4. cook until certain time at certain temperature
  5. take out and wait till cools

in here would be formula such as the formula for the bread, what ingredients etc...

The quadratic formula is just that: a formula for solving quadratic equations

An example of an algorithm for solving quadratics would be:

  1. get quadratic: call a the coefficient in front of x^2, b the coefficient in front of x and c the constant coefficient.

  2. evaluate quadratic formula (both + and - versions) on given a, b and c

  3. simplify

This algorithm solves the actual problem... whereas the formula is a tool used in the process.

share|improve this answer
    
while this example of picking coefficients and simplifying might seem obvious... for more complicated problems the distinction between algorithm and formula gets even clearer because much more complicated steps and subtleties are formed. If you explore computer science a little you will see what I mean. –  frogeyedpeas Mar 14 '13 at 20:30
add comment

An algorithm is a method for solving a problem, but a formula is a sequence of numbers and symbols corresponding to a word in a language. The quadratic formula is an algorithm, because it is a method for solving quadratic equations. Algorithms may not even involve math, but formulas almost exclusively use numbers.

share|improve this answer
    
I think I haven't met the definition of a method but your answer seems reasonable. Nice to know that the quadratic formula is an algorithm although it contains the sign $\pm$. –  guest Mar 14 '13 at 20:16
    
More precisely, the quadratic formula suggests an algorithm for solving quadratic equations; specifically, evaluating the formula. –  Hurkyl Mar 14 '13 at 20:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.