Main Content

Operators and Elementary Operations

Perform arithmetic, relational, and logical operations on symbolic objects

Symbolic Math Toolbox™ includes functions for arithmetic, relational, and logical operations, as well as modulo and complex number operations, on symbolic objects. You can use these functions to perform simple operations like addition, multiplication, and calculating exponents, as well as other operations like finding the nth root, modulus, and finding the quotient and remainder of a division.

Functions

expand all

minusSymbolic subtraction
plusSymbolic addition
timesSymbolic array multiplication
ldivideSymbolic array left division
rdivideSymbolic array right division
powerSymbolic array power
nthrootNth root of symbolic numbers
mtimesSymbolic matrix multiplication
mldivideSymbolic matrix left division
mrdivideSymbolic matrix right division
mpowerSymbolic matrix power
transposeSymbolic matrix transpose
ctransposeSymbolic matrix complex conjugate transpose

Operators

eqDefine symbolic equation
geDefine greater than or equal to condition
gtDefine greater than relation
leDefine less than or equal to condition
ltDefine less than relation
neDefine inequality

Functions

hasCheck if expression contains particular subexpression
hasSymTypeDetermine whether symbolic object contains specific type (Since R2019a)
inNumeric type of symbolic input
isAlwaysDetermine if symbolic conditions are true for all values of variables
isequalDetermine if symbolic inputs are equal
isequalnTest symbolic objects for equality, treating NaN values as equal
isSymTypeDetermine whether symbolic object is specific type (Since R2019a)
maxMaximum elements of symbolic input (Since R2021a)
minMinimum elements of symbolic input (Since R2021a)
piecewiseConditionally defined expression or function

Operators

andLogical AND for symbolic expressions
notLogical NOT for symbolic expressions
orLogical OR for symbolic expressions
xorLogical XOR for symbolic expressions

Functions

allTest whether all equations and inequalities represented as elements of symbolic array are valid
anyTest whether at least one of equations and inequalities represented as elements of symbolic array is valid
hasCheck if expression contains particular subexpression
hasSymTypeDetermine whether symbolic object contains specific type (Since R2019a)
inNumeric type of symbolic input
isAlwaysDetermine if symbolic conditions are true for all values of variables
isequalnTest symbolic objects for equality, treating NaN values as equal
isfiniteCheck whether symbolic array elements are finite
isinfCheck whether symbolic array elements are infinite
isnanCheck whether symbolic array elements are NaNs
isSymTypeDetermine whether symbolic object is specific type (Since R2019a)
logicalDetermine if symbolic equation, inequality, or condition is true
symtrueSymbolic logical constant true (Since R2020a)
symfalseSymbolic logical constant false (Since R2020a)
modSymbolic modulus after division
powermodModular exponentiation
quoremQuotient and remainder
remRemainder after division
absSymbolic absolute value (complex modulus or magnitude)
angleSymbolic polar angle
conjComplex conjugate of symbolic input
imagImaginary part of complex number
realReal part of complex number

Topics