News for hackers. Stuff that matters.
Re:What is algebra? by bitwize on Tuesday August 27, 2013 @10:44AM (#6283713)
The art of transforming mathematical statements in a way that preserves their truth value. That's one guess at it.
Re:What is algebra? by ctdonath on Tuesday August 27, 2013 @01:17PM (#6284764)
This touches on a semantic point which confuses many new programming students: in algebra, the "=" is a specification of truth; in programming, the "=" is an operation of assignment. There is a difference, as in "2 * x = x + x", which is perfectly sensible in the former but pointless/absurd in the latter context. Also, "x = 2" in algebra is the notion of "when it is true that x is the same as 2, other truths occur", a different notion than "store value 2 in variable x, then see what the consequences of other operations are." Alas, the nuance is hard to grok until much later in learning both.
Re:What is algebra? by mercutio2 on Tuesday August 27, 2013 @09:01PM (#6287373)
Nit: not "in programming". I would replace that with "when programming in languages with c-style syntax".

If only pascal had won that particular syntax battle.

Re:What is algebra? by gizmo686 on Tuesday August 27, 2013 @11:34AM (#6284054)
But algebra does not preserve truth values. It guarantees that if you start with a true statement you will end with a true statement. If you begin with a false statement, it is still valid to end with a true statement. Simple examble:

1=2 | false

0 * 1=0 * 2 |Multiply both sides by 0

0=0 | true

Re:What is algebra? by lutusp on Tuesday August 27, 2013 @04:15PM (#6285976)
If you replace your numerical values with algebraic symbols, you may see the problem with your analysis -- its use of a zero allows 1 to equal 2, as shown in this classic example:

http://www.jimloy.com/algebra/two.htm

So multiplying by zero isn't always a legitimate operation. That's why the multiplicative identity is one, not zero.

Re:What is algebra? by gizmo686 on Tuesday August 27, 2013 @07:24PM (#6286978)
Multiplying both sides by zero is always legitimate (if rarely useful). In the example linked, the error is in dividing by zero. More specifically, in dividing by (a-x). Formally speaking, this operation is only defined when (a-x)!=0. Mutipling by zero is defined for all real numbers.
Re:What is algebra? by lutusp on Tuesday August 27, 2013 @11:16PM (#6287841)
The parallel I was making is that a numerical term invalidated an equation, rendered it meaningless, not that the circumstances were identical.
Re:What is algebra? by saraid216 on Tuesday August 27, 2013 @10:44PM (#6287741)
I think you're having trouble with the definition of "preserve". If you begin with a false statement, there isn't actually a truth value available to preserve.
Re:What is algebra? by bitwize on Tuesday August 27, 2013 @04:00PM (#6285885)
Multiplying both sides by zero yields an equation which is vacuously true, and is not useful for solving the problems algebraists set out to solve.
Re:What is algebra? by gizmo686 on Tuesday August 27, 2013 @07:30PM (#6287021)
True, but it is still valid algebra. There are other examples where one might turn a false statement into a true statement without doing something as pointless as multipling by zero. A common example is squaring an equation. Consider a system of equation in which it can be shown that x=3. Within this system, the statement x=-3 is false, however the statement x^2=9 is true.

Again, this specific example is contrived, but this does come up annoyingly often.

Re:What is algebra? by bitwize on Tuesday August 27, 2013 @07:26PM (#6286997)
Sorry, s/vacuously true/tautological/g
Re:What is algebra? by agumonkey on Tuesday August 27, 2013 @11:32AM (#6284039)
That's probably not far from the best definition, and also not far from the translation of `algebra` from the original writings, "breaking and combining".
Re:What is algebra? by bitwize on Tuesday August 27, 2013 @03:59PM (#6285878)
The words al-Khwarizmi used -- al-jabr and al-muqabala -- actually meant "restoring" and "balancing", and referred to adding or subtracting some quantity from both sides of an equation. Muslim mathematicians of the day did not deal with negatives, so today we would consider al-jabr and al-muqabala to be variants of the same operation.

Nevertheless, the original writings were what suggested to me that the important bit of algebra was doing things to equations to change them into some easily solvable canonical form (al-Khwarizmi's work dealt primarily with quadratics).

Re:What is algebra? by agumonkey on Tuesday August 27, 2013 @04:06PM (#6285923)
Thanks for this, I blended al-khwarizmi's book title with "Kitāb al-Jamʿ wa-l-tafrīq bi-ḥisāb al-Hind (The Book of Bringing_together and Separating According to the Hindu Calculation)" mentioned in its wikipedia page.