Maybe this should go in a `MatrixAlgebra.jl` library, with a tensor generalization in `TensorAlgebra.jl`. Alternatively, often this is used to left or right orthogonalize a matrix/tensor, so it could be renamed `leftorth`/`rightortho` like in [TensorKit.jl](https://jutho.github.io/TensorKit.jl/stable/lib/tensors/#TensorKit.leftorth).