Subtract
✖
Subtract
✖
x-y
is equivalent to x+(-1*y).
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Scope (3)Survey of the scope of standard use cases
If any number is approximate, the whole result will be:
In[1]:=1
✖
https://wolfram.com/xid/0c101qq-huig0q
Out[1]=1
Subtracting complex numbers subtracts their components:
In[1]:=1
✖
https://wolfram.com/xid/0c101qq-d6brs7
Out[1]=1
Subtract threads element‐wise over lists:
In[1]:=1
✖
https://wolfram.com/xid/0c101qq-hgaqva
Out[1]=1
Applications (1)Sample problems that can be solved with this function
Find pairs of numbers that differ by an integer:
In[1]:=1
✖
https://wolfram.com/xid/0c101qq-i7miq2
In[2]:=2
✖
https://wolfram.com/xid/0c101qq-gv90xp
Out[2]=2
In[3]:=3
✖
https://wolfram.com/xid/0c101qq-be6j65
Out[3]=3
Verify that their differences are integers:
In[4]:=4
✖
https://wolfram.com/xid/0c101qq-gn9hnr
Out[4]=4
Wolfram Research (1988), Subtract, Wolfram Language function, https://reference.wolfram.com/language/ref/Subtract.html.
✖
Wolfram Research (1988), Subtract, Wolfram Language function, https://reference.wolfram.com/language/ref/Subtract.html.
Text
Wolfram Research (1988), Subtract, Wolfram Language function, https://reference.wolfram.com/language/ref/Subtract.html.
✖
Wolfram Research (1988), Subtract, Wolfram Language function, https://reference.wolfram.com/language/ref/Subtract.html.
CMS
Wolfram Language. 1988. "Subtract." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Subtract.html.
✖
Wolfram Language. 1988. "Subtract." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Subtract.html.
APA
Wolfram Language. (1988). Subtract. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Subtract.html
✖
Wolfram Language. (1988). Subtract. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Subtract.html
BibTeX
✖
@misc{reference.wolfram_2024_subtract, author="Wolfram Research", title="{Subtract}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Subtract.html}", note=[Accessed: 10-January-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2024_subtract, organization={Wolfram Research}, title={Subtract}, year={1988}, url={https://reference.wolfram.com/language/ref/Subtract.html}, note=[Accessed: 10-January-2025
]}