Row operations on a matrix

I’m working on the matrix inversion task and I almost have it. My strategy is to do this;

1 3 3
1 4 3
1 3 4

So I take the inputted matrix and make it double the size and place a identify matrix in the new slot
1 3 3 1 0 0
1 4 3 0 1 0
1 3 4 0 0 1

Next I have to perform row operations to make the left hand side an identify matrix and then the result on the right will be the inverse.


This is where I’m stumped I can get everything up to the point where I have to start the row operations . I don’t know how to go around this on c++ could anyone please explain a way of doing this?

If my explanation of the process isn’t sufficient here is a link that explains it better: http://www.purplemath.com/modules/mtrxinvr.htm
You should use vector of vector because it is dynamic and you can increase the size of array easily.

http://www.cplusplus.com/reference/stl/vector/

http://www.tek-tips.com/faqs.cfm?fid=5575
Topic archived. No new replies allowed.