Complex Numbers

Complex numbers in Math Minion are represented by either a matrix or table value with two columns, the first column being the real component and the second the imaginary one. All complex value functions return table values with the first column labeled r and the second labeled i.

Math Minion has a number of functions that deal with complex numbers. All of these functions share a number of characteristics:

Most complex functions names are formed by prepending a c character to their real functions equivalents. These include cabs, cexp, cln and all the trigonometric functions like csin. See the Complex Number Functions here, or in the function browser for a complete list.

The mathematical operations of multiplication, division and exponentiation are handled by the cmult, cdiv and cpow functions respectively. Each of these functions takes two complex arguments of the form discussed above and returns its result as a complex table value. The normal + and - add and subtract operators work correctly with complex values.

Examples

{complex 3, -2}

returns a single row table value with the r column containing 3 and the i column containing -2. This would represent a complex number of the form 3 - 2i.

{complex 0:9, 2}

returns a 10 row table value with real values 0 through 9 and all the imaginary values being 2.

{cmult {complex 2, 3}, {complex 4, 5}}

returns a single row table value with the r column containing -7 and the i column containing 22.