0% found this document useful (0 votes)
3 views1 page

Matrix Inversion and Division Solutions

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

Matrix Inversion and Division Solutions

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

Homework 1 Solution

1. Inverse of Matrix A
Given matrix A:

A = [1 0 0; 2 5 7; 0 2 9]

MATLAB Code:

A = [1 0 0; 2 5 7; 0 2 9];
A_inv = inv(A)

Result:

[[ 1.00000000e+00 -2.77555756e-17 0.00000000e+00]


[-5.80645161e-01 2.90322581e-01 -2.25806452e-01]
[ 1.29032258e-01 -6.45161290e-02 1.61290323e-01]]

2. Compute A/B and B/A


Given matrices:

A = [8 -3; 2 1], B = [-3 4; 9 2]

MATLAB Code:

A = [8 -3; 2 1];
B = [-3 4; 9 2];
A_div_B = A / B;
B_div_A = B / A

Result A/B:

[[-1.02380952 0.54761905]
[ 0.11904762 0.26190476]]

Result B/A:

[[-0.78571429 1.64285714]
[ 0.35714286 3.07142857]]

You might also like