next up previous
Next: Programming Up: How to Use the Previous: Derivatives and Integrals


The HP48G/GX recognizes two types of arrays, matrices and vectors. They are distinguished by the number of rectangular brackets surrounding the entries. Matrices are enclosed by [[ ]], while vectors are enclosed by [ ].

A matrix or a vector can be entered two ways: by opening the matrix editor tex2html_wrap_inline1271 , or by command line entries. I will demonstrate command line entering and let you play with the matrix editor. Suppose we want to enter the matrix: tex2html_wrap_inline1273

Perform the following keystrokes: 2pt tex2html_wrap623 tex2html_wrap1291 2pt tex2html_wrap623 tex2html_wrap1291 tex2html_wrap757 tex2html_wrap657 tex2html_wrap1301 tex2html_wrap965 tex2html_wrap659 tex2html_wrap657 tex2html_wrap641 tex2html_wrap657 tex2html_wrap1313 tex2html_wrap657 tex2html_wrap629 tex2html_wrap619

Notice that the number of columns in our matrix is determined by the number of items within the second set of brackets. The HP48G/GX will then fill each successive row until it has used all of the numbers given to it. If there are not enough entries to complete a row, an error message will be given. An easy way to edit some of the entries in a matrix already entered is to use the matrix editor. This editor can be accessed by placing the matrix in stack level one and then pushing the key tex2html_wrap1057 . This will open up the matrix editor with the given matrix entered into the editor. If, after some changes have been made, you decide to keep the original matrix, push tex2html_wrap1077 . If you want to keep the changes, push tex2html_wrap619 .

The syntax for multiplying matrices and vectors is exactly the same as for numbers. If you try to add or multiply matrices that are not of the proper size, an error message will be given. The same applies to the algebraic operation of matrix addition.

The best known method for solving a system of linear equations, Gaussian elimination, involves performing a sequence of elementary row operations on the augmented matrix of the system. The HP48G/GX has these operations built into it. They are located in the MTH MATR ROW menus. Go there now. Menu items 5, 6, and 7 perform the elementary row operations. In the following it is assumed that the matrix being transformed is in stack level one.

The first four menu items are used to build or break apart matrices by their rows. See the manual for more details. The HP48G/GX also has a built in command to swap columns. This command is found in MTH MATR COL. In this menu, there are also commands that build up or break apart a matrix by columns.

The HP48G/GX also has a built in solver for a linear system of equations. In fact, this solver will automatically find a unique solution for systems that may not have an actual solution or may have more than one solution. The HP48G/GX finds the least square solution to every system it is given to solve. For example, suppose we want a solution to the system:


Notice first that this system has no solution, and secondly if it did, there would be an infinite number of solutions. No matter, let's use the HP48G/GX to solve this system. Open up the solve menu, 2pt tex2html_wrap609 tex2html_wrap1207 . Highlight Solve lin sys, push tex2html_wrap1075 . Enter the coefficient matrix in the A: field, the right hand side of the system as a vector in the B: field, and then highlight the X: field. Push tex2html_wrap1207 . The HP48G/GX has constructed the least squares solution of minimal norm to this system. To view this least squares solution, highlight the X field and push edit.

next up previous
Next: Programming Up: How to Use the Previous: Derivatives and Integrals

Mike Stecher
Thu Mar 21 09:53:31 CST 1996