206k views
4 votes
Try using the inv command to find the inverse of the matrix Notice the strange output. Include your command and the output in your write-up. Now enter the following matrix A into MATLAB: >> A = [4 9; 5 11] Define B to be its inverse in MATLAB. Then run the commands >> A*B >> B*A to check that it satisfies the definition of inverse. Include your commands and their output in your write-up. (Note that MATLAB may give you entries like -0.0000 in your results. This still counts as 0 for our purposes.) Enter the following column vector x: >> x = [5; 10] Use the following command to multiply A by x: >> y = A*x As usual, include your input and output in your write-up. Without entering anything into MATLAB, what do you think you'll get if you multiply B by y? Explain your answer. Use MATLAB to check your answer to the last question, and include your input and output in your document.

1 Answer

3 votes

Answer:

a)

inv([1 1; 100 100])

warning: matrix singular to machine precision

warning: called from ATest at line 1 column1

ans =

Inf Intf

Inf Inf

b)

A = [4, 9; 5, 11]

B = inv(A)

A*B

B*A

4. 9

5 11

-11.0000 9.0000

5.0000 4.0000

ans . 00000 -0.00000

0 . 00000 1.00000

ans 1.00000 0.00000

0.00000 1.00000

c)

x = [5; 10]

y = A*x

x = [5; 10]

y=

110 135"

d)

B * y is

5.0000

10.0000

e)

B * y

ans 5.0000

10.0000

User Patrick Cauley
by
6.6k points