Javascript Rational Number Matrix Calculator

Information: This calculator will perform many of the basic calculations associated with a first course in linear algebra on matrices with rational entries. Enter your matrix into the spreadsheet and start computing.

Permitted Values: All entries should be rational numbers. Do not enter complex numbers. Any decimal entries will be converted to fractions. Note that this will not cause a decimal such as .3333333 to be converted to 1/3. The value .33333333 will be converted to 3333333/10000000. Of course, .25 will be converted to 1/4 and .125 will be converted to 1/8.

Explanations of Buttons and Matrix Computations

Credits: The trivial routines stripSpaces, makeArray, makeArray2 and makeArray3 were taken from other people. We appreciate the permission from David Binner ( to use his excellent function that computes eigenvalues and eigenvectors. Other useful codes by David Binner can be found at

My brother, Rick Morgan (, created the cool buttons. I take full responsibility for the sad state of the rest of the code. It isn't pretty, slick or optimal, but it is free, and it seems to work. I hope someone makes use of it.

Please send comments to Jeff Morgan (, Department of Mathematics, University of Houston.