WOLFRAM

x-y

is equivalent to x+(-1*y).

Details

  • x-y is converted to x+(-1*y) on input.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Subtract numbers:

Out[1]=1

Subtract expressions:

Out[1]=1

Subtract evaluates to Plus:

Scope  (3)Survey of the scope of standard use cases

If any number is approximate, the whole result will be:

Out[1]=1

Subtracting complex numbers subtracts their components:

Out[1]=1

Subtract threads elementwise over lists:

Out[1]=1

Applications  (1)Sample problems that can be solved with this function

Find pairs of numbers that differ by an integer:

Out[2]=2
Out[3]=3

Verify that their differences are integers:

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 ]}

@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 ]}

@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 ]}