The less-than sign is a mathematical symbol that denotes an
inequality between two values. The widely adopted form of two equal-length strokes connecting in an acute angle at the left, , has been found in documents dated as far back as the 1560s. In mathematical writing, the less-than sign is typically placed between two values being compared and signifies that the first number is less than the second number. Examples of typical usage include and .
Since the development of computer
programming languages, the less-than sign and the greater-than sign have been repurposed for a range of uses and operations.
Computing
The less-than sign, , is an original
ASCII
ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
character (hex 3C, decimal 60).
Programming
In
BASIC
Basic or BASIC may refer to:
Science and technology
* BASIC, a computer programming language
* Basic (chemistry), having the properties of a base
* Basic access authentication, in HTTP
Entertainment
* Basic (film), ''Basic'' (film), a 2003 film
...
,
Lisp-family languages, and
C-family languages (including
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and
C++),
comparison operator <
means "less than".
In
Coldfusion, operator
.lt.
means "less than".
In
Fortran, operator
.LT.
means "less than"; later versions allow
<
.
Shell scripts
In
Bourne shell (and many other shells), operator
-lt
means "less than". Less-than sign is used to
redirect input from a file. Less-than plus ampersand () is used to redirect from a
file descriptor.
Double less-than sign
The double less-than sign, , may be used for an approximation of the ''much-less-than sign'' () or of the opening
guillemet (). ASCII does not encode either of these signs, though they are both included in
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
.
In
Bash,
Perl, and
Ruby, operator (where "EOF" is an arbitrary string, but commonly "EOF" denoting "end of file") is used to denote the beginning of a
here document.
In
C and
C++, operator represents a
binary left shift.
In the
C++ Standard Library, operator , when applied on an output stream, acts as ''insertion operator'' and performs an output operation on the stream.
In
Ruby, operator acts as ''append operator'' when used between an array and the value to be appended.
In
XPath the operator returns true if the left operand precedes the right operand in document order; otherwise it returns false.
Triple less-than sign
In
PHP, operator is used to denote the beginning of a
heredoc statement (where
OUTPUT
is an arbitrary named variable.)
In Bash, is used as a "here string", where is expanded and supplied to the command on its standard input, similar to a heredoc.
Less-than sign with equals sign
The less-than sign with the equals sign, , may be used for an approximation of the
less-than-or-equal-to sign, . ASCII does not have a less-than-or-equal-to sign, but
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
defines it at code point U+2264.
In
BASIC
Basic or BASIC may refer to:
Science and technology
* BASIC, a computer programming language
* Basic (chemistry), having the properties of a base
* Basic access authentication, in HTTP
Entertainment
* Basic (film), ''Basic'' (film), a 2003 film
...
,
Lisp-family languages, and
C-family languages (including
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and
C++), operator means "less than or equal to". In
Sinclair BASIC it is encoded as a single-byte code point token.
In
Prolog
Prolog is a logic programming language that has its origins in artificial intelligence, automated theorem proving, and computational linguistics.
Prolog has its roots in first-order logic, a formal logic. Unlike many other programming language ...
, means "less than or equal to" (as distinct from the arrow ).
In
Fortran, operators and both mean "less than or equal to".
In
Bourne shell and
Windows PowerShell, the operator means "less than or equal to".
Less-than sign with hyphen-minus
In the
R programming language, the less-than sign is used in conjunction with a
hyphen-minus to create an arrow (), this can be used as the left assignment operator.
Spaceship operator
The less-than sign is used in the
spaceship operator.
HTML
In
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
(and
SGML
The Standard Generalized Markup Language (SGML; International Organization for Standardization, ISO 8879:1986) is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on t ...
and
XML), the less-than sign is used at the beginning of tags. The less-than sign may be included with
<
. The less-than-or-equal-to sign, , may be included with
≤
.
Unicode
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
provides various ''less than'' symbols:
The less-than sign may be seen for an approximation of the opening
angle bracket
A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. They come in four main pairs of shapes, as given in the box to the right, which also gives their n ...
, . True angle bracket characters, as required in
linguistics notation, are expected in formal texts.
Mathematics
In an inequality, the less-than sign and greater-than sign always "point" to the smaller number. Put another way, the "jaws" (the wider section of the symbol) always direct to the larger number.
The less-than-sign is sometimes used to represent a
total order,
partial order or
preorder. However, the symbol is often used when it would be confusing or not convenient to use . In mathematical writing using
LaTeX
Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well.
In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
, the
TeX
Tex, TeX, TEX, may refer to:
People and fictional characters
* Tex (nickname), a list of people and fictional characters with the nickname
* Tex Earnhardt (1930–2020), U.S. businessman
* Joe Tex (1933–1982), stage name of American soul singer ...
command is . The Unicode
code point
A code point, codepoint or code position is a particular position in a Table (database), table, where the position has been assigned a meaning. The table may be one dimensional (a column), two dimensional (like cells in a spreadsheet), three dime ...
is .
See also
*
Inequality (mathematics)
In mathematics, an inequality is a relation which makes a non-equal comparison between two numbers or other mathematical expressions. It is used most often to compare two numbers on the number line by their size. The main types of inequality ar ...
*
Greater-than sign
The greater-than sign is a mathematical symbol that denotes an inequality between two values. The widely adopted form of two equal-length strokes connecting in an acute angle at the right, , has been found in documents dated as far back as 1631 ...
*
Relational operator
*
Much-less-than sign
References
{{Reflist
Typographical symbols
Mathematical symbols
Inequalities (mathematics)