% The complex conjugate of a complex number is % obtained by changing the sign of its imaginary % component. % % If % % z = a + bj, % % then the complex conjugate of z is % % zc = a - bj. % % The complex conjugate is often written % % _ % zc = z. % % In MATLAB and Octave, the function 'conj(...)' % returns the complex conjugate of a complex % number. z = 3.2 - 4.7j fprintf('\nThe complex conjugate of z:\n') conj(z) % We can also construct the complex conjugate % directly from the real and imaginary % components. real(z) - 1j*imag(z) fprintf('z = %f%+fj\n', real(z), imag(z)) fprintf('conj(z) = %f%+fj\n', ... real(conj(z)), imag(conj(z))) % Taking the complex conjugate twice returns the % original complex number: % % conj(conj(z)) = z. % % Thus, conjugation is its own inverse. fprintf('\nThe conjugate of the conjugate:\n') conj(conj(z)) z conj(conj(z)) == z % The conjugate of a real number is the real % number itself. If % % z = a + 0j, % % then % % conj(z) = z. fprintf('\nThe conjugate of a real number:\n') conj(3.8) % Consequently, a complex number is real if and % only if % % conj(z) = z. % Conjugation changes the sign of the imaginary % component but does not change the real % component: % % Re(conj(z)) = Re(z) % % Im(conj(z)) = -Im(z). fprintf('\nReal and imaginary components:\n') real(conj(z)) real(z) imag(conj(z)) -imag(z) % The conjugate of an additive inverse is the % additive inverse of the conjugate: % % conj(-z) = -conj(z). fprintf('\nConjugation and the additive inverse:\n') conj(-z) -conj(z) % Now consider two complex numbers. w = 5.3 + 3.2j z = 3.2 - 4.7j % The conjugate of a sum is the sum of the % conjugates: % % conj(w + z) = conj(w) + conj(z). fprintf('\nThe conjugate of a sum:\n') conj(w + z) conj(w) + conj(z) % Similarly, the conjugate of a difference is % the difference of the conjugates: % % conj(w - z) = conj(w) - conj(z). fprintf('\nThe conjugate of a difference:\n') conj(w - z) conj(w) - conj(z) % The conjugate of a product is the product of % the conjugates: % % conj(w*z) = conj(w)*conj(z). fprintf('\nThe conjugate of a product:\n') conj(w*z) conj(w)*conj(z) % A complex number multiplied by its conjugate % is always a nonnegative real number. % % If % % z = a + bj, % % then % % z*conj(z) % % = (a + bj)(a - bj) % % = a^2 + b^2 % % = |z|^2. % % Thus, % % z*conj(z) = |z|^2. fprintf('\nA number times its conjugate:\n') z*conj(z) abs(z)^2 % This property is particularly useful when % dividing complex numbers because it allows % us to replace a complex denominator with a % real denominator. % A complex number and its conjugate have the % same absolute value: % % |conj(z)| = |z|. % % Geometrically, conjugation reflects a point % across the real axis, which does not change % its distance from the origin. fprintf('\nAbsolute value of the conjugate:\n') abs(conj(z)) abs(z) % Conjugation reverses the sign of the argument: % % arg(conj(z)) = -arg(z) (mod 2*pi). % % Geometrically, this again corresponds to % reflecting the complex number across the real % axis. fprintf('\nArgument of the conjugate:\n') angle(conj(z)) -angle(z) % The real component of a complex number can be % obtained by adding the number and its conjugate. % % If % % z = a + bj, % % then % % z + conj(z) % % = (a + bj) + (a - bj) % % = 2a. % % Therefore, % % z + conj(z) % Re(z) = -------------. % 2 fprintf('\nRecovering the real component:\n') real(z) (z + conj(z))/2 % Similarly, subtracting the conjugate gives % % z - conj(z) % % = (a + bj) - (a - bj) % % = 2bj. % % Therefore, % % z - conj(z) % Im(z)j = ------------- % 2 % % and % % z - conj(z) % Im(z) = -------------. % 2j fprintf('\nRecovering the imaginary component:\n') 1j*imag(z) (z - conj(z))/2 % Consequently, % % z + conj(z) % % is always real, while % % z - conj(z) % % is always purely imaginary. fprintf('\nSum and difference with the conjugate:\n') z + conj(z) z - conj(z) % The absolute-value formula can also be written % in terms of the conjugate: % % ___________ % |z| = / z*conj(z). % V fprintf('\nCalculating the absolute value using the conjugate:\n') abs(z) sqrt(z*conj(z)) % Finally, conjugation has a simple geometric % interpretation. % % If % % z = a + bj, % % then % % conj(z) = a - bj. % % Thus, z and conj(z) have: % % - the same real component, % - opposite imaginary components, % - the same absolute value, and % - opposite arguments (modulo 2*pi). % % Geometrically, taking the complex conjugate % reflects a complex number across the real % axis.