Question: How to normalize rows of a matrix?

Since GramSchmidt does not take Matrix as an input (I wish it did), I would like to know how to normalize a matrix rows. For example if input matrix is:

M = [  1    2]
       [  3    4]

How do I convert it into

Mn = [ 1/sqrt(5)    2/sqrt(5) ]
         [ 3/5            4/5          ]

Each row of matrix Mn has length of 1.

Thank you.

 

Please Wait...