Math 236  •  Spring 2001

About function determ

Version 1.1:  21 April 2001

⚠  Caution!

If you need any functions from the package LinearAlgebra`MatrixManipulation` be sure to load this package before you evaluate the cell where your determ is defined!  Otherwise, you will get "shadowing" warning messages and your determ will not be able to access the functions from that package

If you disregard this caution and get the shadowing message, do not despair.  Simply type and evaluate an expression such as
	Remove[AppendRows]  (* or other referenced object from the package *)
and then load the package and again evaluate the cell where your determ is defined.

Define your function determ

In a separate notebook—not this one—define your function determ and any other objects of your own that you might happen to need for it.  For example, you will like want a function minor to form minor submatrices of a matrix—or at least minors along the first row of a matrix.

Examples

Before running the validator, try out your determ on a variety of square matrices and compare the results with those from the built-in function Det.  Be sure to try the "degenerate" case of a 1 × 1 matrix, too.

Get the validator package vddeterm.m

At any time before you are ready to validate your function determ, download my encoded package vddeterm.m in any one of the following three ways:

•  At UMASTR lab only: from the Math_236 directory on drive M: (labelled Math-Stat Files).  An icon for this drive is on the desktop of UMASTR PCs.

• Obtain the file vddeterm.zip from the Files page of the course web site http://www.math.umass.edu/Courses/Math_236.  Then extract the single file vddeterm.m from vddeterm.zip by using WinZip or another "unzip" program.  Be sure that the unzip program is configured so that it does not change end-of-line characters (unless you are going to run the validator on a Mac or on a Linux PC)!

•  If you have an ftp client that does not change end-of-line characters (so not Netscape or Internet Explorer!), get the file vddeterm.m via anonymous ftp from:
	umastr.math.umass.edu
Set the initial remote directory to
 	/pub/lab/Math_236
and use binary mode (not text mode) to download the file vddeterm.m.  For network security reasons, such anonymous ftp access is limited to client computers that are in the umass.edu domain.   This means that the ftp access must be made directly through a campus network-connected computer or via dial-up connection to OIT PPP ("UMAccess").

If you are using Mathematica on a Mac or under Linux

You need to change the end-of-line characters from the DOS convention of CR LF to the convention on your platform (just CR for Mac; just LF for Linux).  For example, under Linux, if you have downloaded vddeterm.zip as a binary file, give the command:
	unzip -a vddeterm.zip
This will extract vddeterm.m and, as it does so, convert the end-of-lines to the *nix LF.

Validating your function determ

A program of mine is going to generate a set of square test matrices and evaluate your function determ in turn at each.  The test data it uses for you are not necessarily the same as the test data it uses for others.  In fact, some of these data involve random numbers, and these random numbers depend in part on the digits in your student ID number.

Do the following four steps:

1.  Be sure that at this Mathematica session you have defined your determ and all the other objects it references directly or indirectly.  In particular, be sure you have already defined any needed functions from past homework and have loaded the package LinearAlgebra`MatrixManipulation` if you need access, for example, to the function AppendRows from that package.

2.  Inside the double quotes in the next cell, type your  student ID number and then evaluate the cell.

myID = "";           
(* type your student ID number inside the quotes *)

Check that you correctly defined myID—evaluate the following cell now.  You should see your ID number as result.

myID

3.  Tell Mathematica where to look for my validator package vdproj.m—edit the following cell so that its first line shows the correct path to the directory to which you downloaded or extracted vdproj.m:

vddetermpath  =  "c:/data";              
AppendTo[$Path,  vddetermpath];

4.  Evaluate the preceding cell.  Check that the preceding cell was indeed evaluated—evaluate the following cell.  The result should include at its end the path to the directory holding the file vdproj.m.

$Path

5.  Run the validator  that tests your function—evaluate the following cell now:

Needs["vddeterm`"]            (* run the validator *)

If you have forgotten to define myID correctly, then you can simply edit myID to make it correct—be sure your ID number is enclosed in double quotes—and then run the preceding cell with Needs["vddeterm`"] again.

If, however, at the current Mathematica session you forgot to define determ or some auxiliary function needed by it—in particular, if you forgot to load a requisite package such as LinearAlgebra`MatrixManipulation`—or if you need to fix up your determ to get it to work properly, then you should:
•  save your notebook containing your function definitions;
•  save this notebook Aboutdeterm.nb with your myID and vddetermpath defined;
•  quit Mathematica and start it again (or, if you know how, leave Mathematica open but quit the kernel and restart the kernel);
•  open your notebook with your function definitions and evaluate them all;
•  open this notebook Aboutdeterm.nb, evaluate its cells defining my auxiliary functions and your myID and vddetermpath; and
•  run the validator again by evaluating the cell Needs["vddeterm`"] .

What to turn in

Do not turn in a hardcopy of this entire notebook!  Rather, turn in only:

•  A listing of your determ and any other objects you defined for it, for example, a function minor.

•  The validation output that results from evaluating the cell Needs["vddeterm`"].