Function: matsupplement
Section: linear_algebra
C-Name: suppl
Prototype: G
Help: matsupplement(x): supplement the columns of the matrix x to an
invertible matrix.
Doc: assuming that the columns of the matrix $x$
are linearly independent (if they are not, an error message is issued), finds
a square invertible matrix whose first columns are the columns of $x$,
i.e.~supplement the columns of $x$ to a basis of the whole space.
\bprog
? matsupplement([1;2])
%1 =
[1 0]
[2 1]
@eprog
Raises an error if $x$ has 0 columns, since (due to a long standing design
bug), the dimension of the ambient space (the number of rows) is unknown in
this case:
\bprog
? matsupplement(matrix(2,0))
*** at top-level: matsupplement(matrix
*** ^--------------------
*** matsupplement: sorry, suppl [empty matrix] is not yet implemented.
@eprog