This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Complex conjugation

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.




conjugate(z) computes the conjugate (z) - i (z) of a complex number z = (z) + i (z).

For numbers of type DOM_INT, DOM_RAT, DOM_FLOAT, or DOM_COMPLEX, the conjugate is computed directly and very efficiently.

conjugate can handle symbolic expressions. Properties of identifiers are taken into account (see assume). An identifier z without any property is assumed to be complex, and the symbolic call conjugate(z) is returned. See Example 2.

conjugate knows how to handle special mathematical functions, such as:

_mult   _plus   _power  abs     cos     cosh    cot
coth    csc     csch    erf     erfc    exp     gamma
igamma  sec     sech    sin     sinh    tan     tanh
See Example 1.

If conjugate does not know how to handle a special mathematical function, then a symbolic conjugate call is returned. See Example 3.

This function is automatically mapped to all entries of container objects such as arrays, lists, matrices, polynomials, sets, and tables.

Environment Interactions

conjugate is sensitive to properties of identifiers set via assume.


Example 1

conjugate knows how to handle sums, products, the exponential function and the sine function:

conjugate((1 + I)*exp(2 - 3*I))

delete z: conjugate(z + 2*sin(3 - 5*I))

Example 2

conjugate reacts to properties of identifiers:

delete x, y: assume(x, Type::Real):
conjugate(x), conjugate(y)

Example 3

If the input contains a function that the system does not know, then a symbolic conjugate call is returned:

delete f, z: conjugate(f(z) + I)

Now suppose that f is some user-defined mathematical function, and that f(z)¯=f(z¯) holds for all complex numbers z. To extend the functionality of conjugate to f, we embed it into a function environment and suitably define its "conjugate" slot:

f := funcenv(f):
f::conjugate := u -> f(conjugate(u)):

Now, whenever conjugate is called with an argument of the form f(u), it calls f::conjugate(u), which in turn returns f(conjugate(u)):

conjugate(f(z) + I), conjugate(f(I))



An arithmetical expression


A container object: an array, an hfarray, a list, a matrix, a polynomial, a set, or a table.

Return Values

arithmetical expression or a container object containing such expressions

Overloaded By



If a subexpression of the form f(u,...) occurs in z and f is a function environment, then conjugate attempts to call the slot "conjugate" of f to determine the conjugate of f(u,...). In this way, you can extend the functionality of conjugate to your own special mathematical functions.

The slot "conjugate" is called with the arguments u,... of f.

If f has no slot "conjugate", then the subexpression f(u,...) is replaced by the symbolic call conjugate(f(u,...)) in the returned expression.

See Example 3.

Similarly, if an element d of a library domainT occurs as a subexpression of z, then conjugate attempts to call the slot "conjugate" of that domain with d as argument to compute the conjugate of d.

If T does not have a slot "conjugate", then d is replaced by the symbolic call conjugate(d) in the returned expression.

See Also

MuPAD Functions

Was this topic helpful?