A complex conjugate of a complex number in mathematics is a number that has the same real part (as that of the original complex number) and an imaginary part of equal magnitude (as that of the corresponding imaginary part of the original complex number) but with opposite signs.
If a+imb
is a given complex number, then a-imb
is its complex conjugate.
We can get the complex conjugate of a complex number in Julia using the conj()
function.
conj(complex number)
The conj()
function takes a complex number as a parameter and returns its complex conjugate.
Let's take a look at an example of this.
#given complex numberz = 1 + 5im#get complex conjugatedisplay(conj(z))
In the above code snippet:
z
.z
using the function conj()
and display the returned result.