Question: I have to write a program in C that finds the inverse matrix of double A[3][3] = {1/2, 1, 0, 0, 2/3, 0, -1/2, -2,

I have to write a program in C that finds the inverse matrix of double A[3][3] = {1/2, 1, 0, 0, 2/3, 0, -1/2, -2, 2/3} by using an iterative method (A^-1 = I + B + B^2+...B^20) where I is the identity matrix and B = I - A. You must stop at B^20 and print A^-1(inva) and A * A^-1 to check that your matrix is correct. Also you must initialize inva and a temp matrix with I. My professor is looking for something along the lines of:

temp = pb*B

pb = temp

inva = inva + pb

I have attached my code as a photo, I am not sure what I am doing wrong. I also do have a print function (printIt) that I do know works just fine, just could not make it all fitI have to write a program in C that finds the inverse

Start here main.c x 19 20 21 void addThem (double x[] [3], double y[] [3], double z [ ] [3]) int i, : double tt3 t3]: 23 24 25 26 27 28 29 30 31 32 for i-0: i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!