You are on page 1of 2

Homework -3

Due: 09/20/2023, Class time

Instructions:

• Late Submissions are not accepted.


• MATLAB files need not be submitted but the screen shot of code and the output can be shown in
the submission document.
• Students are encouraged to actively work in the groups.
)

1. Write a user defined function in MATLAB to obtain transpose of any matrix given as an input,
compare it with inbuilt transpose function in MATLAB (Hint: use for loop to convert 𝑎𝑎(𝑖𝑖, 𝑗𝑗)−>
2 −5 7
𝑎𝑎(𝑗𝑗, 𝑖𝑖)). Test your output on simple matrix 𝐴𝐴 = �1 5 8�
3 7 9

1 5 4
2. Obtain all minors for a 3 × 3 matrix A=�0 2 1�, also evaluate the determinant of matrix.
1 2 3
1 2 6
3. Calculate the adjoint of a matrix E=�0 1 3�, also obtain the inverse of this matrix, compare your
0 0 6
result from inv function in the MATLAB.

4. Using the method of substitution, solve for 𝑥𝑥1 , 𝑥𝑥2 , and 𝑥𝑥3 in the following equations,

𝑥𝑥1 − 𝑥𝑥2 + 𝑥𝑥3 = 3


2𝑥𝑥1 + 𝑥𝑥2 − 𝑥𝑥3 = 0
3𝑥𝑥1 + 2𝑥𝑥2 + 2𝑥𝑥3 = 15

5. Using Cramer’s rule obtain the unknowns in the below equations, also mention the three
determinants you get in the process and show the procedure you followed.

2𝑥𝑥1 − 𝑥𝑥2 + 𝑥𝑥3 = −1,

3𝑥𝑥1 + 3𝑥𝑥2 + 9𝑥𝑥3 = 0,


3𝑥𝑥1 + 3𝑥𝑥2 + 5𝑥𝑥3 = 4.

You might also like