I have an NxN matrix of linear constraints that is not of full rank. In other words, some of the constraints are linear combinations of other constraints. The "standard" linear algebra tools (determinants, matrix inversion, etc.) seem to only be useful for testing for linear dependence. I'd like to not only discover the existence of redundant constraints but figure out which constraints can be written as linear combinations of other constraints and remove the redundant constraints to obtain the largest linearly independent set of constraints possible. What's a reasonable algorithm to do this?