In mathematics, two things are equal, when they are the same. That is, they have the same (mathematical) value, and the same mathematical properties. Mathematicians have defined an equals operator (Which they write as the = sign) to express this.
x = y is obviously the same as y = x.
In mathematical
logic, the equivalence (
equal) relation is defined as follows: Given any
logic predicate P,
x = y only if
P(x) = P(y). In other words, if you find a predicate that has a different truth value when it is applied to either x or y, then the two cannot be equal.
In
geometry, the concept is that of
congruence. Two
shapes are congruent if it is possible that they occupy the same space, if one of the objects is moved or rotated. If this result can be achieved by scaling (shrinking or enlarging) one of the two objects, they are called
similar
In
Computer Science, usually, the mathematical definition is taken. Very often, the comparison is written
(and the assigment, ie. giving a value, is written
=, or
:=). In
object-oriented languages, or languages who have
pointers, there is an additional problem. Those languages know of references (what are in fact pointers). If two such references do not reference the exactly same object, they are different.
a
b will be false, for this case.
For this reason, many such languages have introduced another operator (in Java, they call it equals). This operator compares the actual values of the objects, not where the variables that reference them point to.
In
social sciences,
'equal has a similar definition: Two things are equal if they have the same properties. Two people might be equal as to the level of their
education. Usually, someone who is equal to someone else in some property is called a
peer.
Mathematics | Geometry