backslash(\) left matrix division.SyntaxX=A\BDescription
Backslash is the left matrix division:
X=A\B is a solution to A*X=B.
If A is square and non-singular X=A\B is
equivalent to X=inv(A)*B in exact arithmetic,
but the computations are more accurate and cheaper in floating point arithmetic.
Hence, to compute the solution of the linear system of equations A*X=B,
the backslash operator should be used, and the inv function
should be avoided.
In the case where A is square, the solution X can be computed
either from LU factorization or from a linear least squares solver.
If the condition number of A is smaller than 1/(10*%eps) (i.e. if A is well conditioned),
the LU factorization with row pivoting is used.
If not (i.e. if A is poorly conditioned), then X is the minimum-norm solution which
minimizes ||A*X-B|| using a complete
orthogonal factorization of A (i.e. X is the solution of a linear least squares problem).
If A is not square, X is a least square solution,
i.e. norm(A*X-B) is minimal (Euclidean norm). If A is full
column rank, the least square solution, X=A\B, is uniquely
defined (there is a unique X which minimizes norm(A*X-B)).
If A is not full column rank, then the least square
solution is not unique, and X=A\B, in general, is not the solution
with minimum norm (the minimum norm solution is X=pinv(A)*B).
A.\B is the matrix with (i,j) entry A(i,j)\B(i,j).
If A (or B) is a scalar A.\B is equivalent to
A*ones(B).\B (or A.\(B*ones(A)).
A\.B is an operator with no predefined meaning. It may be used
to define a new operator (see overloading) with
the same precedence as * or /.
ExamplesSee also
slash
inv
pinv
percent
ieee
linsolve
umfpack
History5.4.1The threshold level for conditioning in blackslash increased.