MATLAB_Diagonalizable Help

MATLAB_Diagonalizable is a graphical user interface (GUI) that attempts to diagonalize a given matrix A. The GUI seeks a diagonal matrix, D, and invertible matrix, P, such that

A =  P- 1DP

To use the GUI, click the ‘Input Matrix’ Button.


PIC

Figure 1: MATLAB_Diagonalizable GUI


Pop-up boxes will guide you through the input process of the matrix A


PIC

Figure 2: Pop-up box for inputs of A


Once the inputs have been made and a solution exists, the GUI will output the matrix A and the diagonal of D in the appropriate panels. However, not all matrices are diagonalizable. In these cases, a pop-up box will appear informing you that A is not diagonalizable.


PIC

Figure 3: Output in Panels


The matrices P, P-1 and D will display in the command window. Furthermore, the matrix A has been saved in the workspace, so you can verify

      - 1
A =  P   DP
by using appropriate MATLAB syntax. For example, in the command window type
Pinv*D*P
then hit return. MATLAB performs the two matrix multiplications and you can verify equality with A. Another way to verify the definition is to type
norm (A-Pinv*D*P  )
in the command window and then hit return. MATLAB should output either zero or a very small number illustrating the proper matrices have been produced.

PIC

Figure 4: Output in Command Window


To reset the GUI, click the ‘Reset’ button.