The Museum of HP Calculators

# Eigenvalue Extraction for the HP 15C

This program is by Michael de Estrada and is used here by permission.

This program is supplied without representation or warranty of any kind. Michael de Estrada and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

## Overview

The Hewlett-Packard HP 15c scientific programmable calculator was the first model to include built-in matrix operations. The following very short and elegant program shows how the combination of matrix operations and the built-in Solve program can be used to tackle a very sophisticated mathematical problem that otherwise would require hundreds of programming steps.

This procedure is used to determine the eigenvalues (roots) of a set of n homogeneous equations in the form: [xB - A]{y} = 0, where A and B are n X n symmetric matrices (at least one must be positive definite), y is a 1 X n vector (eigenvector) and x is the unknown scalar (eigenvalue). The following short program uses the HP-15C's matrix operations to construct the matrix [xB - A], and then compute its determinant. The HP SOLVE function is then used to determine the eigenvalues x, which yield a zero determinant. There will be n distinct solutions. The procedure is as follows:

1) Dimension matrices A, B and C by entering n in the x and y registers and pressing f DIM A, f DIM B, f DIM C. The maximum value of n is 3 with normal memory boundaries, however, it is possible to squeeze in an n = 4 problem by relocating the data boundary to dd = 10 ( 10 f DIM (i) ).
2) Define C as the result matrix by pressing f RESULT C.
3) Store the values for matrices A and B.
4) Enter the upper and lower bound estimates of the eigenvalue in the y and x registers. These must be positive real values.
5) Press f SOLVE A to execute the program and solve for the eigenvalue, which will be displayed in the x register.

## Listing

001 f LBL A       42,21,11
002 RCL MATRIX B  45,16,12
003 X                   20
004 RCL MATRIX A  45,16,11
005 -                   30         [xB - A]
006 f MATRIX 9    42,16, 9         Compute Determinant
007 g RTN            43 32