Question

Solve the following set of equations using numpy’s linear algebra capabilities. 7? + 5? − 3?...

Solve the following set of equations using numpy’s linear algebra capabilities.

7? + 5? − 3? = 16

3? − 5? + 2? = −8

5? + 3? − 7? = 0

a) First, on paper, put the equation in the form ?x = ?.

b) Next, create arrays in Python for the ? and ? matrices.

c) Use numpy’s solve() function to solve for the ? matrix. Record the results on paper.

d) Finally, verify the solution by printing the matrix product ?? to show that it is indeed ?.

e) Just for fun, calculate ?−?, the inverse of ?. Show that the product ?−?? gives the same result for ?. Record the result on paper.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import numpy as np

from numpy import linalg as lin

a = np.array([[7,5,-3], [3,-5,2] , [5,3,-7]])

b = np.array([[16], [-8] , [0]])

x = lin.solve(a, b)

print("Answer: ", x)

print(" b = ", np.matmul(a, x))

=================================================

Add a comment
Know the answer?
Add Answer to:
Solve the following set of equations using numpy’s linear algebra capabilities. 7? + 5? − 3?...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT