I am working on implementing a matrix library in C++ using template classes for controlling dimensions and types (it really makes things so much easier for me since I can avoid doing a lot of checks in the code). Anyways… I do not assume much about the type of the dimensions of the matrix (in fact nonthing). I really want to be able to do all of the basic arithmetic operations such as adding, subtracting, multiplying, and “dividing” matrix’ with another (suitable) matrix — the tricky part seems to be the “division”.

The problem is that all the texts I can find on this operation (that is finding the inverse of a matrix) assumes that the matrix in question is square — since I don’t, those texts seem to be very useless to me (well, at least I have to think about further than the text). So far I have come up with proof that you can “divide” an m times n matrix with a p times n matrix — the inverse matrix would then be n times p, giving the result of the “division” dimensions m times p. Now all I have to do is find an algorithm that works and (hopefully) doesn’t take forever to finish, that will find the inverse of a matrix regardless of its shape.

Now, I’ve found a free text book on linear algebra, simply called “Linear Algebra” which can be found here. Having read through the first chapter I find that the book is quite good, very readable and in all respects have good clear examples of all interesting examples (covered by the book) — something by far too many books lack, which cost money. The book also comes with a complete set of solutions to all the exercises, which I plan to work through tomorrow (that is today, as soon as I get up).

I was supposed to follow a course on linear algebra this quarter, but I guess I’ll study the thing on my own instead.