definition of rank of a matrix