Question on the method to row reduce matrix When I am given a matrix to row reduce usually I would follow the algorithm 
Which quickly put is
Look at first entry if 0 and everything below move to right if 1 and everything below (and above) is 0 move diagonally down. Otherwise get the pivot to 1 by multiplying the row by 1/a if a is the pivot entry... the make everything above and below 0 by adding or subtracting a multiple of the pivot row from them rows. Move diagonally down and then terminate.
However I came across a question which involved entries which were fractions involving radicals and when it came to some of the steps in the algorithm it became messy. My question is whether the algorithm is the nicest way to do these problems or if there are things like multiplying a row by the denominator of fractions to get rid of them which should be done first. I don't have the specific question to hand sorry. Thanks
 A: Your algorithm will allow you to row reduce any matrix. 
As for whether or not your algorithm is "optimal" in the sense that I think you are asking, I believe the answer is no. Unfortunately, there is not really an optimal algorithm for row reduction so as to get the "cleanest" and "nicest" numbers.
As a theoretical computer science exercise, it may be possible to run a series of computations using the entries in your matrix and code an algorithm that will theoretically give the easiest order of row operations. However, from a practical standpoint, it's not realistic to try and follow what would undoubtedly be a very complicated and obnoxious algorithm. Essentially, even if such an algorithm were to exist in theory, actually executing it in practice would likely require you to run so many auxiliary computations to the side so as to render the method less efficient in reality. 
Your best bet is to take a good look at your rows before blindly following any algorithm, and seeing if there are any steps you can take at any stage to clean up your computations. Some examples of things to look for could be:


*

*If there are fractions in your matrix, multiplying the row by denominators will clear those.

*If a row appears to be a scalar multiple or a near scalar multiple of another row, you might as well clear the lower one. 

*If you have more zeros to the left of your leading entry in a given row than you would expect in the reduced form, move the row down.


and so forth. But practice is the way to go, versus searching for a silver bullet algorithm. 
A: The algorithm allows you to perform any elementary row operation at any stage of the process. 
Therefore you may multiply a row by the common denominator to get rid of fractions or you may add a multiple a row to another row to simplify operations. 
The best time to do so is determined by your skills and probably is as soon as you can. 
