TITLE(solve @@ solve a system of equations)
USAGE(
solve(a, b, tol = 1e-7)
)
ALIAS(solve)
ALIAS(solve.qr)
ARGUMENTS(
ARG(a @@ a numeric matrix containing the coefficients of the linear system.)
ARG(b @@ a numeric vector or matrix giving the right-hand side(s) of the
linear system.  If omitted, LANG(b) is taken to be an identity matrix
and LANG(solve) will return the inverse of LANG(a).)
ARG(tol @@ the tolerance for detecting linear dependencies in the columns
of LANG(a).) 
)
DESCRIPTION(
This function solves the equation LANG(a %*% x = b) for LANG(b),
where LANG(b) can be either a vector or a matrix.
)
SEEALSO(
LANG(LINK(backsolve)), LANG(LINK(qr.solve)).
)
EXAMPLES(
hilbert <- function(n) { i <- 1:n; 1/outer(i-1,i,"+") }
h8 <- hilbert(8); h8
solve(h8) # gives error: 'singular'
sh8 <- solve(h8, tol=1e-10) 
round(sh8 %*% h8, 3)
)
