Quantcast

Documentation Center

  • Trial Software
  • Product Updates

conjugate

Complex conjugation

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

conjugate(z)
conjugate(L)

Description

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.

Examples

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 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))

Parameters

z

An arithmetical expression

L

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

z

Algorithms

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?