Online Matrix Division: Solve AX = B for X

Enter the real square matrix A as a string of real numbers separated by spaces:


Enter the real rectangular matrix BT (B transpose) as a string of real numbers separated by spaces:


What's going on?

Matrix division is solving the matrix equation AX = B for X. Probably the easiest way to think of it is as solving a set of linear systems like Ax=b, where A is always the same n x n matrix, but you have a number (say m) of different right-hand-sides (bs) and therefore the same number of solution vectors (xs). You just put all the b column vectors side-by-side to make B and all the x column vectors side-by-size to make X.

Matrix division includes solution of one linear system and matrix inversion as special cases. To do one linear system, just use m = 1; to do inversion, make B the identity matrix.

The solver here handles real values only and the A matrix is limited to size 15 x 15. It uses LU decomposition with partial pivoting, so doesn't exploit any special properties of A. To do a fraction of what Matlab accomplishes with one single character ('\'), this solver uses a 54-line CLIP program called from an 88-line Perl wrapper! But then you can't do Matlab matrix division on your mobile phone. Which could really cramp your linear algebra opportunities.

Note that you have to enter the transpose of the B matrix. This is to make it easy to enter a set of different right hand sides.

John Robinson