Complex.Conjugate Method (Complex)

 

Computes the conjugate of a complex number and returns the result.

Namespace:   System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

public static Complex Conjugate(
	Complex value
)

Parameters

value
Type: System.Numerics.Complex

A complex number.

Return Value

Type: System.Numerics.Complex

The conjugate of value.

The conjugate of a complex number inverts the sign of the imaginary component; that is, it applies unary negation to the imaginary component. If a + bi is a complex number, its conjugate is a - bi.

The following example displays the conjugate of two complex numbers.

using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex[] values = { new Complex(12.4, 6.3), 
                           new Complex(12.4, -6.3) };
      foreach (Complex value in values)
      {
         Console.WriteLine("Original value: {0}", value);
         Console.WriteLine("Conjugate:      {0}\n", 
                           Complex.Conjugate(value).ToString());
      }                           
   }
}
// The example displays the following output:
//       Original value: (12.4, 6.3)
//       Conjugate:      (12.4, -6.3)
//       
//       Original value: (12.4, -6.3)
//       Conjugate:      (12.4, 6.3)

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone
Available since 8.1
Return to top
Show: