numerically approximate the solution to a linear system - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Education : Student Package : Numerical Analysis : Visualization : Student/NumericalAnalysis/IterativeApproximate

Student[NumericalAnalysis][IterativeApproximate] - numerically approximate the solution to a linear system

Calling Sequence

IterativeApproximate(A, b, opts)

IterativeApproximate(A, opts)




Matrix; a square nxn matrix or an augmented (A|b) nxm matrix, where m=n+1



(optional) Vector; a vector of length n



equations of the form keyword=value, where keyword is one of distanceplotoptions, initialapprox, maxiterations, method, output, plotoptions, showsteps, stoppingcriterion, tolerance; the options for numerically approximating the solution to Ax=b



The IterativeApproximate command numerically approximates the solution to the linear system A.x=b, using one of these iterative methods: Gauss-Seidel, Jacobi, and successive over-relaxation.


It is possible to return both the approximation and the error at each iteration with this command; see the output and stoppingcriterion options under the Options section for more details.


It is also possible to view a column graph of the distances (errors) at each step, showing whether convergence is achieved.


When A and b are 3-dimensional, it is possible to obtain a plot tracing the path of the approximation sequence.


The entries of A and b must be expressions that can be evaluated to floating-point numbers.



The initialapprox, tolerance and maxiterations are all required keyword parameters; they must be given when the IterativeApproximate command is used.


If A is positive definite  or strictly diagonally dominant , then A is invertible, and so the system A.x = b has a unique solution. Use IsMatrixShape to check if a matrix has one of these properties.


If the matrix A is strictly diagonally dominant , both the Jacobi and Gauss-Seidel methods produce a sequence of approximation vectors converging to the solution, for any initial approximation vector.


If A is positive definite , the Gauss-Seidel method produces a sequence converging to the solution, for any initial approximation vector; the same holds for the successive over-relaxation method, provided that the relaxation factor w is strictly between 0 and 2.


In general, if A gives rise to an iteration matrix T such that the spectral radius of T is strictly less than 1, the resulting sequence is guaranteed to converge to a solution, for any initial approximation vector.


This procedure operates numerically; that is, if the inputs are not already numeric, they are first evaluated to floating-point quantities before computations proceed. The outputs will be numeric as well. Note that exact rationals are considered numeric and are preserved whenever possible throughout the computation; therefore, one must specify floating-point inputs instead of exact rationals to obtain floating-point outputs.





View the approximate solution using the Jacobi method.




View the approximate solution with the error at each iteration.



View the approximate solution with the error at each iteration as a column graph.


The linear system may be input as an augmented matrix







See Also

Student[NumericalAnalysis], Student[NumericalAnalysis][IterativeFormula], Student[NumericalAnalysis][VisualizationOverview]

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam