In logic, the identity relation is normally, (by definition), the transitive, symmetric, and reflexive relation that holds only between a thing and itself. That is, identity is the two-place predicate, _=_, such that for all x, y, "x=y" is true iff x is y.
(These definitions are of course inapplicable in some area of quantified logic, such as fuzzy logic and fuzzy set theory , and with respect to vague objects .)
Metaphysicians, and sometimes philosophers of language and mind, ask other questions:
- What does it mean for an object to be the same as itself?
- If x and y are identical (are the same thing), must they always be identical? Are they necessarily identical?
- What does it mean for an object to be the same, if it changes over time? (Is applet the same as applet+1?)
- If an object's parts are entirely replaced over time, as in the Ship of Theseus example, in what way is it the same?
Leibniz's ideas have taken root in the philosophy of mathematics, where they have influenced the development of the predicate calculus as Leibniz's law. Mathematicians sometimes distinguish identity from equality. More mundanely, an identity in mathematics may be an equation that holds true for all values of a variable.
More recent metaphysicians have discussed trans-world identity -- the notion that there can be the same object in different possible worlds.
In object-oriented programming, object identity is a mechanism for distinguishing different objects from each other. This is based on the philosophical concept of identity, but applied to data structures.
In programs, one frequently may have several variables (or pointers) which refer to the same underlying data structure. An identity predicate allows one to ask whether two variables refer to the same thing. In many languages, identity can be determined more efficiently than equality since the former involves simply a pointer comparison while the latter must traverse data structures.
Cultural identity is the (feeling of) identity of a group or culture, or of an individual as far as she/he is influenced by her/his belonging to a group or culture. Common habits, characteristics, ideas may be clear markers of a shared cultural identity, but essentially it is determined by difference: we feel we belong to a group, and a group defines itself as a group, by noticing and highlighting differences with other groups and cultures.
People have different physical appearances notably the sexual gender, shape of the face, skin pigmentation, height, and color of hair. The choice of clothing and bodily adornments vary. Sounds can be used for identification: the voice, language, timber, vocabulary, physical movements. Personal identity may be proved by an identity document. Animal identity may be proved via a microchip.