Maple essentially uses an LU decomposition in many cases, but sometimes an SVD or a special algorithm for univariate polynomials over the integers. You can see this by perusing the following:
> interface(verboseproc=3):
> print(LinearAlgebra:-LA_Main:-Rank);
proc(M)
local DatatypeM, DatatypeMix, i, j, localM, n, m, r, svd, v,
typeM, typeZx, dummy1, dummy2, dummy4;
option `Copyright (c) 1990 by the University of Waterloo. A\
ll rights reserved.`,
`Copyright (c) 1999 Waterloo Maple Inc. All rights reserved.`
;
if UseHardwareFloats = 'deduced' then UseHardwareFloats
:=
`if`(Digits <= floor(evalhf(Digits)), true, false)
end if;
ASSERT(CheckArgs([args], ['Matrix']), `CheckArgs/Msg`);
DatatypeM := rtable_options(M, 'datatype');
if
DatatypeM = 'anything' or DatatypeM = 'complex(anything)'
then typeM := CheckFloat(M)
else typeM := DatatypeM
end if;
m, n := op(1, M);
if member(typeM,
['sfloat', 'float[8]', 'complex(sfloat)', 'complex[8]'])
then
userinfo(2, 'LinearAlgebra',
`computing singular value decomposition`);
DatatypeMix := GetResultDataType(typeM, typeM,
UseHardwareFloats);
if DatatypeMix = DatatypeM then localM := M
else localM := Matrix(M, 'datatype' = DatatypeMix,
'shape' = [rtable_indfns(M)],
'storage' = rtable_options(M, 'storage'),
'order' = 'Fortran_order')
end if;
svd := SingularValues(localM, 'output' = ['S'],
'conjugate' = true, 'outputoptions'['U'] = [],
'outputoptions'['S'] = [],
'outputoptions'['Vt'] = []);
for i to min(m, n) do
if svd[i] = 0. then return i - 1 end if;
if 10^(Digits - 1)*abs(svd[i]) < abs(svd[1]) then
return i - 1
end if
end do;
return min(m, n)
elif DatatypeM = 'polynom(integer)' or
DatatypeM = 'polynom(rational)' then
userinfo(2, 'LinearAlgebra',
"fraction free Gaussian elimination");
r := LUDecomposition(M, 'method' = 'FractionFree',
'output' = ['rank'], 'conjugate' = false,
'inplace' = false, 'outputoptions'['P'] = [],
'outputoptions'['L'] = [],
'outputoptions'['U'] = [],
'outputoptions'['U1'] = [],
'outputoptions'['R'] = [],
'outputoptions'['NAG'] = []);
return r
end if;
if not member(DatatypeM, ['integer', 'complex(integer)',
'realcons', 'complex(realcons)', 'rational', 'numeric',
'extended_numeric', 'complex(numeric)', 'integer[1]',
'integer[2]', 'integer[4]', 'integer[8]',
'complex(extended_numeric)']) then
v := select(type, indets(M), name)
else v := {}
end if;
v := map(eval, v);
if nops(v) = 0 and type(M, 'Matrix'(integer)) and (
24 < min(m, n) or 5 < max(m, n) and 64000 < max(m, n)^3*
evalf(log10(max(1,
LinearAlgebra:-LA_Main:-Norm(M, 1, 'conjugate' = 'false'))))
) then
localM := Matrix(m, n, M);
dummy1, dummy2, r, dummy4 :=
`FFGE/iTRANS`(localM, m, n, 1, n, 0, 1, 3)
elif nops(v) = 1 and type(M, 'Matrix'(polynom(integer)))
then
userinfo(2, 'LinearAlgebra', "modular reduction for\
univariate polynomial case");
r := `Rank/univar`(M, m, n, v[1])
elif type(M, 'Matrix'(polynom(rational))) then
userinfo(2, 'LinearAlgebra',
"fraction free Gaussian elimination");
r := LUDecomposition(M, 'method' = 'FractionFree',
'output' = ['rank'], 'conjugate' = false,
'inplace' = false, 'outputoptions'['P'] = [],
'outputoptions'['L'] = [],
'outputoptions'['U'] = [],
'outputoptions'['U1'] = [],
'outputoptions'['R'] = [],
'outputoptions'['NAG'] = [])
else
userinfo(2, 'LinearAlgebra', "Gaussian elimination");
r := LUDecomposition(M,
'method' = ':-GaussianElimination',
'output' = ['rank'], 'conjugate' = false,
'inplace' = false, 'outputoptions'['P'] = [],
'outputoptions'['L'] = [],
'outputoptions'['U'] = [],
'outputoptions'['U1'] = [],
'outputoptions'['R'] = [],
'outputoptions'['NAG'] = [])
end if;
r
end proc
So I guess what you really need is to implement some kind of Gaussian Elimination routine in Maple.