Complex.Multiply Operator

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Multiplies a specified number by another specified number, where at least one of them is a complex number, and the other could be a double-precision real number.

Overloads

Multiply(Double, Complex)

Multiplies a specified double-precision real number by a specified complex number.

Multiply(Complex, Double)

Multiplies the specified complex number by a specified double-precision real number.

Multiply(Complex, Complex)

Multiplies two specified complex numbers.

Remarks

The Multiply operator allows performing multiplication operations that involve complex numbers. It enables code such as the following:

C#
Complex c1 = Complex.One;
Complex c2 = new Complex(1.4, 2.3);
Complex c3 = c1 * c2;

If the multiplication results in an overflow in either the real or imaginary component, the value of that component is either Double.PositiveInfinity or Double.NegativeInfinity.

Languages that don't support custom operators can call the Multiply equivalent group of methods instead.

The Multiply operators that receive one double are more efficient than the operators that receive two Complex numbers.

Multiply(Double, Complex)

Source:
Complex.cs
Source:
Complex.cs
Source:
Complex.cs

Multiplies a specified double-precision real number by a specified complex number.

C#
public static System.Numerics.Complex operator *(double left, System.Numerics.Complex right);

Parameters

left
Double

The double-precision real value to multiply.

right
Complex

The complex value to multiply.

Returns

The product of left and right, as a complex number.

Remarks

The multiplication of a real number (which can be regarded as the complex number a + 0i) and a complex number (c + di) takes the following form:

ac+adi

Languages that don't support custom operators can call the Complex.Multiply(Double, Complex) equivalent method instead.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

Multiply(Complex, Double)

Source:
Complex.cs
Source:
Complex.cs
Source:
Complex.cs

Multiplies the specified complex number by a specified double-precision real number.

C#
public static System.Numerics.Complex operator *(System.Numerics.Complex left, double right);

Parameters

left
Complex

The complex value to multiply.

right
Double

The double-precision real value to multiply.

Returns

The product of left and right, as a complex number.

Remarks

The multiplication of a complex number (a + bi) and a real number (which can be regarded as the complex number c + 0i) takes the following form:

ac+bci

Languages that don't support custom operators can call the Complex.Multiply(Complex, Double) equivalent method instead.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

Multiply(Complex, Complex)

Source:
Complex.cs
Source:
Complex.cs
Source:
Complex.cs

Multiplies two specified complex numbers.

C#
public static System.Numerics.Complex operator *(System.Numerics.Complex left, System.Numerics.Complex right);

Parameters

left
Complex

The first complex value to multiply.

right
Complex

The second complex value to multiply.

Returns

The product of left and right.

Implements

Remarks

The multiplication of a complex number, a + bi, and a second complex number, c + di, takes the following form:

(acbd)+(ad+bc)i

Languages that don't support custom operators can call the Complex.Multiply(Complex, Complex) equivalent method instead.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0