I've always though that a whole number shouldn't EVER be on the left side of the equals sign. Don't want to explain more, but you should get my idea.
5=5
A=5
5=A
One of these in my view isn't right.
Just curious to see if anyone else think the same way I do.
In programming or just in math?
In programming of course not, but wouldn't that also be the same for math in general?
I'll have a variable on the "wrong" side when I'm doing algebra, because sometimes it's just easier for me to visualize:
Code:
8 - 2x = 3
8 = 3 + 2x <-- It's easier to just move a negative term over to make it positive
5 = 2x
5/2 = x
I don't care how many math majors yell at me for doing it "wrong", this is just what's easiest for me.
In programming though, "A = 3" doesn't mean the same thing as it does in math. In reality, "A = 3" means "A <- 3" or "A gets 3". Otherwise "A = A + 1" makes no sense, because A != A + 1.
So yeah, given how = means something different in programming, the variable has to be on the left side.
Yeah, I do it too without switching sides....but when writing an equation and stuff like that, I don't see how they can write it 5=10x+4 or something like that when 5 is already equal to 5 and not an equation. Good to see someone else understands what I am saying and gives me hope that thinking about this doesn't mean I'm crazy.
Drag wrote:
I don't care how many math majors yell at me for doing it "wrong", this is just what's easiest for me.
If a math major really had a problem with that, I'd doubt they'd go far. In the essence of math there isn't difference between the two sides of an equal sign...
Oh, I see what you mean. Yeah, if your equation has just one variable, it's traditionally on the left side of the equal sign, since the left side is usually the side that has all of the operations on it, with the right side just being the result of all the stuff you do on the left side.
Though, if someone gives you 5 = 10x + 4, there's nothing stopping you from rewriting it as 10x + 4 = 5.
Hmm... what about something like 2x = 3y + 2?
2x = 3y + 2
2x - 3y = 2
3y + 2 = 2x
Which one would you prefer?
Those don't matter since it's 2 equations, prefferably the smaller on the left. But a known number on the left side just annoys the shit outta me I guess.
Drag wrote:
2x = 3y + 2
2x - 3y = 2
3y + 2 = 2x
Which one would you prefer?
There is no universal "preference" if you were applying an equation like this your preference in the format you wrote it would depend on how you were using the equation. In the case you were solving for x or y you wouldn't "prefer" any of those as a final answer for example.
It's silly to have a "preference" in what's on what side of the equal sign without a known (or implied) application. From the math side of the house anyways, I'm not referring to programming here.
In maths, there isn't any problem in putting a number on the left of the equal sign.
And yes, I'm a maths major, and my job is an editor for maths textbooks.
I think it's a mathematical axiom that if A = B is equlivalent to B = A
It doesn't matter what A and B are, variable or constants or anything else.
Equals sign in math is commutative, or symmetrical, or some thing.
In programming, the equals sign is NOT commutative, but that's not relevant to this discussion, is it?
This is because most programming languages use the equal sign as assignment (sometimes they use other things such as ' := '), and in this case most languages restrict that the expression (usually a variable) to be assigned something should be put on the left, to avoid confusion. The equal sign can also be used for assignments in maths, but more often it's in form like 'Let A = 5.' (I think some programming languages use 'Let' for assignment too) and while there is nothing wrong in putting the variable on the right mathematically, still it's more usual to have it on the left to avoid confusion when it's an assignment.
But when the equal sign is used for comparison (which is the most case when doing maths) there is usually no harm in swapping the expressions on the two sides, in both maths and programming (unless it's due to limitation in implementation in some particular programming languages). As C-variant languages mostly use '==' for comparison instead of a single '=', most people nowadays regard '=' as assignment only (which is not the case in maths), and thus think that you cannot put a real number on the left of it, even in maths.