The classical Euclidean algorithm for pairs of real numbers is generalized to real
n
n
-vectors by
Alg
(
n
,
Z
)
{\text {Alg}}\left ( {n,{\mathbf {Z}}} \right )
. An iteration of
Alg
(
n
,
Z
)
{\text {Alg}}\left ( {n,{\mathbf {Z}}} \right )
is defined by three steps. Given
n
n
real numbers
Alg
(
n
,
Z
)
{\text {Alg}}\left ( {n,{\mathbf {Z}}} \right )
constructs either
n
n
coefficients of a nontrivial integral linear combination which is zero or
n
n
independent sets of simultaneous approximations. Either the coefficients will be a column of a
GL
(
n
,
Z
)
{\text {GL}}\left ( {n,{\mathbf {Z}}} \right )
matrix or the simultaneous approximations will be rows of
GL
(
n
,
Z
)
{\text {GL}}\left ( {n,{\mathbf {Z}}} \right )
matrices constructed by
Alg
(
n
,
Z
)
{\text {Alg}}\left ( {n,{\mathbf {Z}}} \right )
. This algorithm characterizes linear independence of reals over rationals by
GL
(
n
,
Z
)
{\text {GL}}\left ( {n,{\mathbf {Z}}} \right )
orbits of rank
n
−
1
n - 1
matrices.