# HP 49g+ User Manual Page 346

Graphing calculator.

If A is a square matrix and A is non-singular (i.e., it's inverse matrix
exist, or its determinant is non-zero), LSQ returns the exact solution to
the linear system.
If A has less than full row rank (underdetermined system of equations),
LSQ returns the solution with the minimum Euclidean length out of an
infinity number of solutions.
If A has less than full column rank (over-determined system of
equations), LSQ returns the "solution" with the minimum residual value
e = A⋅x – b. The system of equations may not have a solution,
therefore, the value returned is not a real solution to the system, just
the one with the smallest residual.
Function LSQ takes as input vector b and matrix A, in that order. Function
LSQ can be found in Function catalog (‚N). Next, we use function LSQ
to repeat the solutions found earlier with the numerical solver:
Square system
Consider the system
with
2
3
A
1
3
2
2
The solution using LSQ is shown next:
2x
+ 3x
–5x
= 13,
1
2
3
x
– 3x
+ 8x
= -13,
1
2
3
2x
– 2x
+ 4x
= -6,
1
2
3
5
x
1
8
,
x
,
x
and
2
4
x
3
13
b
13
.
6
Page 11-24