Introduction to Mathematica and
Linear Algebra

Getting Started
Start by loading the "Matrix Manipulation" package so that everything we want to use is available.

Type   <<LinearAlgebra`MatrixManipulation` (Note: The apostrophes are backwards.)

Press Shift-Enter. There is no output for loading a package.

Basic Input
Let’s create the matrix A = wpeD.jpg (1231 bytes).  There are several ways to do this.

Let’s get the template for matrix B =wpeE.jpg (1404 bytes) a different way.

Matrix Operations

Multiplication

Inverses

Other Operations
Let’s take another look at what’s available in the palette.

1. Find the trace of A and of B.
2. Find the transpose of B.
3. Use Mathematica to verify that (AB)T = B T A T ¹ A T B T for matrices A and B as defined above.

Since B is singular, we need to change it to find the inverse.
Let’s change b32 from 3 to 0.

Type: B = ReplacePart[B, 0, {3, 2}].

4. Use Mathematica to verify that (AB)-1 = B -1 A -1 ¹ A -1 B -1 for matrices A and B.
5. Use Mathematica to verify that (B -1)T = (B T)-1 for the matrix B.

To calculate a determinant use Det[A].

6. Find det(A) and det(B)
7. Find det(AB) and det(A + B).
8. Find det(AT), det(BT), det(A-1), det(B-1).
9. Make B the same as it was originally. Use "ReplacePart" to do so. Find det(B).
10. What conclusions do you draw from these examples.

Exercises
Do the following Chapter 1 Supplementary Exercises (p.74):
1, 2, 8, 15, 16, 27, 9, 10, 12ab (Read and think about 12c), 19, 22

 Return to


Abby Brown - Torrey Pines High School - 2/2002