0% found this document useful (0 votes)
11 views8 pages

Admath (Temp)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views8 pages

Admath (Temp)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

PROBLEM 1: BASIC COMPLEX NUMBER OPERATIONS (6 PTS)

GIVEN TWO COMPLEX NUMBERS 𝑧1 = 3 + 4𝑖 AND 𝑧2 = 1 − 2𝑖

● PERFORM THE FOLLOWING OPERATIONS: (A) ADDITION, (B) SUBTRACTION, (C)


MULTIPLICATION, (D) DIVISION
● FIND THE (E) CONJUGATE AND (F) ABSOLUTE VALUE OF 𝑧1

ANSWER:
A. ADDITION
% Given complex number
z1 = 3 + 4i;
z2 = 1 - 2i;

% Add the given complex number


result_a = z1 + z2;

% Display the result


disp('result_a');

4.0000 + 2.0000i

B. SUBTRACTION
% Given complex number
z1 = 3 + 4i;
z2 = 1 - 2i;

% Subtract the given complex number


result_b = z1 - z2;

% Display the result


disp('result_b');

2.0000 + 6.0000i

Leading Innovations, Transforming Lives, Building the Nation


C. MULTIPLICATION
% Given complex number
z1 = 3 + 4i;
z2 = 1 - 2i;

% Multiply the given complex number


result_c = z1 * z2;

% Display the result


disp('result_c');

11.0000 - 2.0000i

D. DIVISION
% Given complex number
z1 = 3 + 4i;
z2 = 1 - 2i;

% Divide the given complex number


result_d = z1 / z2;

% Display the result


disp('result_d');

-1.0000 + 2.0000i

E. CONJUGATE
% Given complex number
z1 = 3 + 4i;

% Find the conjugate of z1


result_e = conj(z1);

% Display the result


disp('result_e');

3.0000 - 4.0000i

Leading Innovations, Transforming Lives, Building the Nation


F. ABSOLUTE VALUE
% Given complex number
z1 = 3 + 4i;

% Find the absolute value of z1


result_f = abs(z1);

% Display the result


disp('result_f');

Leading Innovations, Transforming Lives, Building the Nation


PROBLEM 2: MATRIX MULTIPLICATION WITH COMPLEX NUMBERS (2 PTS)
GIVEN 2 MATRICES
𝐴 = [1 + 𝑖 2 − 𝑖 3 + 𝑖
4 − 𝑖 5 + 𝑖 6 − 𝑖]
𝐵 = [1 + 𝑖 2 − 𝑖
3+𝑖 4− 𝑖
5 + 𝑖 6 − 𝑖]

● PERFORM MATRIX MULTIPLICATION (G) AXB

ANSWER:
G. MATRIX MULTIPLICATION
% Given matrices
A = [1+1i 2-1i 3+1i
4-1i 5+1i 6-1i];
B = [1+1i 2-1i
3+1i 4-1i
5+1i 6-1i];

% Multiply the Matrix A and B


result = A * B;

% Display the result


disp(‘Matrix Multiplication Result:’);
disp(result);

Matrix Multiplication Result:


21.0000 + 9.0000i 29.0000 - 2.0000i
50.0000 +12.0000i 63.0000 -19.0000i

Leading Innovations, Transforming Lives, Building the Nation


PROBLEM 3: COMPLEX NUMBER PLOTTING (5 PTS)
GIVEN A SET OF COMPLEX NUMBERS:
(ℎ)1 + 𝑖; (𝑖) 2 + 2𝑖; (𝑗) 3 + 3𝑖; (𝑘)4 + 4𝑖; (𝑙)5 + 5𝑖
● PLOT THESE NUMBERS ON THE COMPLEX PLANE

ANSWER:
COMPLEX NUMBER PLOTTING
% Given complex number
h = 1+1j;
i_complex = 2+2j;
j_complex = 3+3j;
k = 4+4j;
l = 5+5j;

% Separate real and imaginary values


x_real_values = [real(h), real(i_complex), real(j_complex), real(k), real(l)];
y_imaginary_values = [imag(h), imag(i_complex), imag(j_complex), imag(k), imag(l)];

% Plot the given values


figure
plot(x_real_values,y_imaginary_values,'ro');

% Add labels for the table


xlabel('Real Part');
ylabel('Imaginary Part');
title('Plot of Complex Numbers');
grid on;

Leading Innovations, Transforming Lives, Building the Nation


PROBLEM 4: MATRIX DETERMINANT AND INVERSE (2 PTS)
GIVEN A 2X2 MATRIX 𝐶 = [1 + 𝑖 2 − 𝑖 3 + 𝑖 4 − 𝑖 ]
● CALCULATE ITS (M) DETERMINANT AND (N) INVERSE

ANSWER:
M. DETERMINANT
% Given matrix
C = [1+1i 2-1i; 3+1i 4-1i];

% Calculate the determinant


result_m = det(C);

% Display the result


disp(‘Determinant of C:’);
disp(result_m);

Determinant of C:
-2.0000 + 4.0000i

N. INVERSE
% Given matrix
C = [1+1i 2-1i; 3+1i 4-1i];

% Calculate the inverse


result_n = inv(C);

% Display the result


disp(‘Inverse of C:’);
disp(result_n);

Inverse of C:
-0.6000 - 0.7000i 0.4000 + 0.3000i
0.1000 + 0.7000i 0.1000 - 0.3000i

Leading Innovations, Transforming Lives, Building the Nation


PROBLEM 5: ADJOINT OF A MATRIX (1 PT)
GIVEN A 2X2 MATRIX 𝐷 = [1 + 𝑖 2 + 𝑖 3 − 𝑖 4 − 𝑖 ]
● CALCULATE THE (O) ADJOINT (CONJUGATE TRANSPOSE) OF A COMPLEX MATRIX.

ANSWER:
O. ADJOINT
% Given matrix
D = [1+1i, 2+1i; 3-1i, 4-1i];

% Compute the matrix of cofactors


cofactors_D = [D(4), -D(2); -D(3), D(1)];

% Take the transpose of the matrix of cofactors


adj_D = transpose(cofactors_D);

% Take the conjugate of each element to get the adjoint


adj_D = conj(adj_D);

% Display the adjoint of D


disp(‘Adjoint of D:’);
disp(adj_D);

Adjoint of D:
4.0000 + 1.0000i -2.0000 + 1.0000i
-3.0000 - 1.0000i 1.0000 - 1.0000i

Leading Innovations, Transforming Lives, Building the Nation


PROBLEM 6: SOLVING A SYSTEM OF SIMULTANEOUS EQUATIONS (4 PTS)
● SOLVE THE FOLLOWING SYSTEM OF SIMULTANEOUS EQUATIONS FOR X:
− 2. 0 𝑎 + 5. 0𝑏 + 1. 0𝑐 + 3. 0𝑑 + 4. 0𝑒 − 1. 0𝑓 = 0. 0
2. 0 𝑎 − 1. 0𝑏 − 5. 0𝑐 − 2. 0𝑑 + 6. 0𝑒 + 4. 0𝑓 = 1. 0
− 1. 0 𝑎 + 6. 0𝑏 − 4. 0𝑐 − 5. 0𝑑 + 3. 0𝑒 − 1. 0𝑓 =− 6. 0
4. 0 𝑎 + 3. 0𝑏 − 6. 0𝑐 − 5. 0𝑑 − 2. 0𝑒 − 2. 0𝑓 = 10. 0
− 3. 0 𝑎 + 6. 0𝑏 + 4. 0𝑐 + 2. 0𝑑 − 6. 0𝑒 + 4. 0𝑓 =− 6. 0
2. 0 𝑎 + 4. 0𝑏 + 4. 0𝑐 + 4. 0𝑑 + 5. 0𝑒 − 4. 0𝑓 =− 2. 0

ANSWER:
% Solve the following system of simultaneous equation for x

% Coefficient matrix A
A = [-2.0, 5.0, 1.0, 3.0, 4.0, -1.0;
2.0, -1.0, -5.0, -2.0, 6.0, 4.0;
-1.0, 6.0, -4.0, -5.0, 3.0, -1.0;
4.0, 3.0, -6.0, -5.0, -2.0, -2.0;
-3.0, 6.0, 4.0, 2.0, -6.0, 4.0;
2.0, 4.0, 4.0, 4.0, 5.0, -4.0];

% Right-hand side vector B


B = [0.0; 1.0; -6.0; 10.0; -6.0; -2.0];

% Solve
result = A\B;

% Display the result


disp(‘Solution for x:’);
disp(result);

Solution for x:
0.6626
-0.1326
-3.0137
2.8355
-1.0852
-0.8360

Leading Innovations, Transforming Lives, Building the Nation

You might also like