TABLE OF CONTENTS

Chapter One		Introduction

1.1	Mathematica's Conventions						2

1.2	Computations and Basic Inputs					4

1.3	Exercises								5

Chapter Two		Matrices annd Linear Equations

2.1	Matrices: Addition, Multiplication, Transpose, Inverse		6

2.2	Special  Matrices: Identity, Diagonal, Random 			10

2.3	Solutions of Linear Systems of Equations 				11

Chapter Three		Determinants							18

Chapter Four		Vectors and Vector Spaces

4.1	Vector Algebra 							21

4.2	Linear Independence and Span 					23

4.3	Null Space and Rank of a Matrix					25

4.4	Transtion Matrix 							27

4.5	The Gram-Schmidt Orthogonalization Process				28

Chapter Five 		Eigenvalues and Eigenvectors

5.1	Eigenvalues, Eigenvectors, Diagonalization				31

5.2	Diagonalization of Symmetic Matrices 				34

Chapter One	Introduction to Mathematica

1.1   Mathematica's Conventions

1. 1. 1   Naming

Built-in Mathematica commands, functions, constants, and other expressions begin with capital  letters, and are - for the most part-  one or more full-length English words.  Mathematica is case sensitive and so a common cause of error is the failure to  capitalize command names. For example, Plot,  Integrate, FindRoot, ParametricPlot3D are valid function names. Sin, Exp, Det, GCD, Max are some of the standard mathematical abbreviations that are exceptions to  the full-length-English-word(s) rule. User defined functions and variables  can be any mixture of upper and lower case letters and numbers. However, a  name cannot begin with a number. By convention, user defined functions  begin  with a  lower-case letter, but this is not required. For example f, g1, myPlot, r12, sOLution, Method1, are permissible function names. 
Example 1: 	 Evaluate cos(π)
Solution:     We will use this example to show two possible errors before giving the  correct answer.

cos[Pi]

This is a typical capitalization error one makes when using Mathematica.  The comment before the output  Out[1] = cos[π] indicates a possible  error.

Cos[pi]

Here Mathematica did not recognize pi and hence returned the command unevaluated. The correct command to  evaluate cos(π) is

Cos[Pi]

NOTE:    It is worth noting that Mathematica keeps track of the calculations it performs in a given session. The  inputs are denoted by In[k] and the outputs are denoted by Out[k]. Thus, In[1] is the first input and Out[1] is the output of the first  input.

1. 1. 2   Parentheses, Square Brackets and Braces

Mathematica interprets various types of brackets differently. Using an incorrect type  of bracket is another common source of error.  Mathematica's bracketing conventions are:

1) 	Parentheses, ( ), are used only for grouping. For example (x-y)^2, 1/(a+b), (x^3-y)/(x+3y^2). It is worth noting that Mathematica understands f(2) as f times 2, and not as the value of the function f at 2.

2) 	Square Brackets, [ ], are used for function arguments. Thus Sin[Pi], Simplify[(x^3-y`^3)/x-y)], Sqrt[346] are proper use of square brackets. If f is a user-defined function, then f[2] is f evaluated at 2.

3)	 Braces or curly brackets, { }, are used  for lists, ranges, and iterators. In all cases, elements are  separated by commas. Here are the typical use of braces:
	{1, 4, 9, 16, 25 ,36}   the list of the square of the first six positive integers.
	Plot[ f[x], {x, -5,5}]   specifies the range of values for x.
	Table[m^3, {m, 1, 100}] specifies the values of the iterator m, i.e., the values of m; m goes  from 1 to 100.

NOTE:    We can write comments with an input. The comments should be enclosed  by (* and *). For example,  Table[ (n^2),{ n, 1, 6 } ]   (*returns a list of the square of the first six positive  integers*)

Example 2: 	Below we give examples of the correct and incorrect usage of brackets.

((2^3)-4)/(4+3*(9^2))          (* a  correct use of (...) *)

[(2^3)-4]/[4+3*(9^2)]        (* an incorrect use of [...] *)

Sqrt[343]       (* a correct use of [...] *)

Sqrt(343)     (* an incorrect use of (...) *)

1. 1. 3   Equal Signs

The following are Mathematica rules of using the equal sign symbol.

1)  	A single equal sign ( = )  assigns a value to a variable. Thus q=3 means that q will be assigned the value 3. If we enter 10+q^3, Mathematica will return 37. As another example take y=x^3-x+1. Now, if we assign a value for x, say x=2, then Mathematica evaluates y using that value of x  and uses the result, 7 in our case, in any input containing y afterwards.

2) 	A colon-equal sign( := ) creates a delayed statement for an expression, used in defining a  function. For example f[x_]:=x^3-x+1 will reevaluate the function f for each new value of x.

3) 	A double equal sign( = = ) is a test for the equality of two expressions. If we set x = -5, then evaluating x == -5 returns True, and x == 5 returns False. Another common usage of == is as in Solve[x^3-x+1==0,x]

1. 1. 4   Referring to Previous Results

Mathematica remembers all of the inputs and outputs in a session, and we can refer to  a previous output by using the percent sign (%) notation. A single % refers to Mathematica's last output, %% refers to the next-to-last output, and so on.   %k refers to output  line numbered k. For example %45 refers to output number 45.  (NOTE: CTRL +L reproduces the last input and CTRL+SHIFT+ L reproduces the last output.)

1.2	Computations and Basic Inputs

Mathematica uses +, - , * , / ,  and  ^  for addition, subtraction, multiplication, division and power, respectively. Multiplication can also be performed by leaving a blank  space between factors.

Mathematica can  convert  numerical values to decimal form. The command for this is N[expr] or N[expr,n].  In most cases, N[expr]  returns six digits of expr or gives expr in the form n.abcde*(10^m).  N[expr,n] attempts to give n digits  of expr. Mathematica can perform calculations to arbitrary precision and can handle numbers  that are arbitrarily large or small.
Example 3: 	Here are some typical usages of N[..]

Pi

N[%]

Note that the command   N[%] gives a decimalized version of the last output. Similarily  N[%k] can be used to get the decimal equivalent of Output[k].

N[Pi,200]

Mathematica 3.0 allows us to enter mathematical expressions and some of the commonly used  commands from  6 different palettes. If we click on the File menu and go to  Palettes we will find 7 options. The first six options conatin most of the symbols  we need.  BasicInput is a palette which can be used  to enter mathematical  expressions involving exponents,  rational  expressions, radicals, integrals, derivatives, summation, product, matrices,  some of  the commonly used constants( π,  e, i,  ∞) and some of the Greek letters.

Example 4:	Enter (∫_0^1)((x^3)/(Sqrt[2x-1]))dx   in a notebook.

Solution:    One way to enter this expression into a Mathematica notebook is as follows: Go to the BasicInput palette and click on the definite integration symbol (∫_□^□)□d□ . Type 0 in the lower box and using the TAB key move to the top box and  type 1. Use the TAB to go to the box where the integrand should be typed.  While in this box go to the palette and  click on (□/□). Go back to the pallete and click on (□^□) and type (x^3) in this box. Go to the box in the denominator and then go to the palette  to click on (Sqrt[□]) and type 2x-1. Finally, using the TAB once again, go to the last box and  type x.

1.3 	Exercises

1.	Evaluate the following expressions:
	a) 103.41+20*76	b) (((5^2)+π)/(1+π))	 c) (1/(1+(1/(1+(1/(4!))))))	 d) ((2.06*(10^9))/(0.99*(10^(-8))))

2.	Enter the following expressions in a notebook. 
	(a)	(80^(1/3))			(b)	((1024^(1/5))/(2^(-3)))		(c)	((Sqrt[125])^(1/3))
	
	(d)	(Sqrt[((10(a^7)b)^(1/3))])		(e)	((((((x^(-3))(y^4))/5)))^(-3))		(f)	 (((((3(m^(1/6))(n^(1/3)))/(4(n^((-2)/3))))))^(2  ))

Chapter Two	 Linear Equations and Matrices

2.1  Matrices: Addition, Multiplication, Transpose, Inverse

Example 1:  Consider the following matrices:

A=(({{2, 3, 1}, {3, 3, 1}, {2, 4, 1}}));    B =(({{2, 0, 0}, {1, -4, 8}, {1, -1, 2}})) ;   X =(({{2, 4}, {0, 1}, {2, 6}})) ;   Y  =(({{1}, {0}, {6}}));   Z =(({{-1, 1, 4}}))

Compute each of the following.
	a)     3A - 4B   	b)     AB  	c)     BA  	d)    X^T   	e)     X^T B Y Z

Solution: 	We first enter the matrices in Mathematica as follows. A matrix can be typed using braces, with a pair of braces around each row. A comma separates the rows as well as the entries in a row. For example, the matrix A can be entered as follows.

A={{2,3,1},{3,3,1},{2,4,1}}

In order to display matrix A in the usual form, we use the command:

A;MatrixForm[A]

In the above, note that the semicolon tells Mathematica not to print the result of matrix A in a list form.

Another way of entering a matrix, such as B, is to perform the following. From the Input menu choose Create Table/Matrix/Palette.  Then, select Matrix and identify the number of rows and columns of the matrix to be 3. Click OK and a 3x3 matrix is generated. You can now insert the entries of the matrix and use TAB to go from one entry to the next.

B=(({{2, 0, 0}, {1, -4, 8}, {1, -1, 2}}))

Similarly, we enter matrix X.

X= (({{2, 4}, {0, 1}, {2, 6}}))

A column matrix such as Y is entered by  putting  braces around each entry.

Y={{1},{0},{6}};MatrixForm[Y]

We can also use the palettes to create a matrix and  enter matrix Y as follows.

Y=(({{1}, {0}, {6}}))

Next, we enter the row matrix  Z.

Z={{-1,1,4}};MatrixForm[Z]

a )  We evaluate the matrix  3A - 4B and display it in matrix form.

3 A-4 B;MatrixForm[3A-4B]

b)  The product of the matrices A & B is obtained by typing A .B. Note that if you omit the dot  that  is  between A & B, then the product is not obtained.

A.B;MatrixForm[A.B]

c)  Similarly, we get the product of matrices B and A.

B.A;MatrixForm[B.A]

Observe that the above calculations show that matrix multiplication  is not commutative.

d)  The  transpose of X is obtained by entering:

Transpose[X];MatrixForm[Transpose[X]]

e)   First, observe that the product of the matrices (X^(T  )) B  Y  Z   is a 2x3 matrix (Do you see why?).  This product is obtained by entering:

Transpose[X].B.Y.Z
MatrixForm[%]

Remark: In Mathematica, the notation % refers to the last output. Thus, in the above, the command MatrixForm[%] is used to express the last output in the usual matrix representation.

Example 2:  Use the matrices in Example 1 to verify each of the following identities.

a)     (((AX))^(T )) = (X^T)(A^(T ))  		b)     (AB)X =A (BX)  		c)       (A+B)X = AX + BX

Solution:	a)  We verify that Transpose[AX] = Transpose[X]. Transpose[A] by computing:

Transpose[A.X]-Transpose[X].Transpose[A]

b)  Next, we verify that matrix multiplication, when defined, is associative.

(A.B).X-A.(B.X)

c)  We show that matrix multiplication is distributive over matrix addition.

(A+B).X-(A.X+B.X)

Example 3:  Let W = 3A - 4B, where A and B are the matrices defined in Example 1. Find each of the following.

a)  (Subscript[w, 21]) = the entry in row 2 and column 1
	b)  the second row of W    
	c) the third column of W

d) the submatrix obtained by deleting row 1 and column 3 of W.

Solution:	First, we find the matrix W as follows.

W=3 A-4 B;MatrixForm[W]

From a given matrix, such as W,  we can extract single entries, rows, columns or submatrices as follows.
a)  To obtain the entry in row 2 and column 1, the command is:

W[ [ 2,1]]

b)   To obtain the second row of W, the command is:

W[[2]]

c)  To obtain the third column of W, we enter:

W[[{1,2,3},{3}]]//MatrixForm

d)  The submatrix obtained by deleting row 1 and column 2 of W  is the one having rows 2 & 3 and  columns 1 & 3 of W. This can be obtained as follows.

W[[{2,3},{1,3}]]//MatrixForm

Example 4: 	a) For the matrix A  in Example 1, find  (A^(-1)) and show that A (A^(-1)) = I.

b) Find the inverse of  a general 2x2 matrix  (({{a, b}, {c, d}})) assuming that ad - bc is nonzero.

Solution:	a)  The inverse of a nonsingular square matrix A is obtained by the command Inverse[A]. For our case, we see that

Inverse[A];MatrixForm[Inverse[A]]

We can check the result by computing the product of A with Inverse[A].

A.Inverse[A]//MatrixForm

b)  The formula for computing the inverse of a general 2x2 square matrix can be obtained as follows.

Clear[a,b,c,d]
Inverse[{{a,b},{c,d}}] //MatrixForm

2.2  Special  Matrices: Identity, Diagonal, Random

1.	The command IdentityMatrix[n] gives the n×n identity matrix. For example, the 3x3 identity matrix is obtained by:

IdentityMatrix[3]
MatrixForm[%]

2. 	The command DiagonalMatrix[list] gives the diagonal matrix with the elements of the list on the main diagonal and 0 elsewhere. An example of a 3x3 diagonal matrix is,

DiagonalMatrix[{3,-5,7}]
MatrixForm[%]

3.  	One can generate a  random matrix of any size. For example a 3x3 random matrix whose entries are numbers between 0 and 1 can be obtained by:

RandomReal[{0,1},{3,3}]
%

An example of a 5x4 random matrix whose entries are  integers -9 and 9 can be btained by:(Note: the semicolon at the end of the first input tells Mathematica not disply the output.)

RandomInteger[{-9,9},{5,3}]
%

2.3  Solutions of Linear Systems of Equations

Example 5:  Solve the following system of linear equations.

a)  ({{	(Subscript[x, 1]) - 2 (Subscript[x, 2]) + 3 (Subscript[x, 3]) = 9}, {-(Subscript[x, 1])+3(Subscript[x, 2])           =-4}, {2(Subscript[x, 1])-5(Subscript[x, 2])+5(Subscript[x, 3])=17}})				b)  ({{	(Subscript[x, 1])  +    (Subscript[x, 2]) = 3 }, {0.3(Subscript[x, 1])+0.3(Subscript[x, 2]) =0.9}})

c)  ({{	(Subscript[x, 1]) -2 (Subscript[x, 2]) + 5 (Subscript[x, 3])-3(Subscript[x, 4]) =23.6}, {(Subscript[x, 1])+4(Subscript[x, 2]) -7(Subscript[x, 3])-2(Subscript[x, 4]) =-4}, {3(Subscript[x, 1])-5(Subscript[x, 2])+7(Subscript[x, 3])+4(Subscript[x, 4])=29.9}})			d)  ({{	2x  +y +z-2w=  1      }, {3x-2y+z-6w=-2}, {   x +   y-z-    w=-1}, {6x  +        z-9w=-2}, {5x-y+2z-8w=3}})

Solution:  	A system of linear equations that is equivalent to the matrix equation Ax=b may be solved using the command LinearSolve[A,b]. 
 a)  The system is equivalent to the matrix eqiuation Ax = b. We type A and b and then apply the command LinearSolve.

A={{1,-2,3},{-1,3,0},{2,-5,5}};MatrixForm[A]

b={{9},{-4},{17}};MatrixForm[b]

x=LinearSolve[A,b]

Thus, we see that the solution is   (Subscript[x, 1])=1 (Subscript[(,x), 2])=-1 and  (Subscript[x, 3])=2. Another way of solving the above is to form the augmented matrix Ao and express it in reduced row echelon form. The augmented matrix Ao is given by

Ao={{1,-2,3,9},{-1,3,0,-4},{2,-5,5,17}};MatrixForm[Ao]

We now use the command RowReduce that puts the augmented matrix in reduced row echelon form. This gives matrix A1:

A1=RowReduce[Ao];MatrixForm[A1]

We  can now read the solution  (Subscript[x, 1])=1 (Subscript[(,x), 2])=-1 and  (Subscript[x, 3])=2. A third way of solving the above system is to use x=Inverse[A].b, if the matrix A is invertible. In our case, this becomes

x=MatrixForm[Inverse[A].b]

Again, note that we get the previously obtained solution of the system.

b)  We type the coefficient matrix A and the constant matrix b and then apply LinearSolve.

A={{1,1},{.3,.3}}

b={{3},{.9}}

LinearSolve[A,b]

In this case, Mathematica is indicating that the coefficient matrix is nonsingular and the system has no solution. However, the system has clearly infinite solutions given by  (Subscript[x, 2])=3 - (Subscript[x, 1]),  (Subscript[x, 1])  arbitrary.  This shows that it is always important to check the results. The reason for failure may be due to  round-off error in the use of decimals. Thus, we try to solve this by retyping A as A1, and b as b1, by expressing all entries as fractions, and applying the command LinearSolve.

A1={{1,1},{(3/10),(3/10)}}
b1={{3},{(9/10)}}
LinearSolve[A1,b1]

In this case, Mathematica gives a solution of  (Subscript[x, 1])=3,  (Subscript[x, 2])=0. This is just one of the infinitely many solutions. This shows that when using the command LinearSolve one has to avoid using decimals. Also, Mathematica may give one of infinitely many solutions.

Another approach is to find the reduced row echelon form  of the augmented matrix. First,  we enter the augmented matrix  A2 where all entries are expressed in fractional form.

A2={{1,1,3},{(3/10),(3/10),(9/10)}};MatrixForm[A2]

Next, we compute A3, the reduced row echelon form of A2.

A3=RowReduce[A2];MatrixForm[A3]

From the above we see that the system has infinite solutions given by   (Subscript[x, 2])=t,  (Subscript[x, 1])=3-t.

c)  First, we use the command LinearSolve after entering the coefficient matrix A and the constant matrix b.

A={{1,-2,5,-3},{1,4,-7,-2},{3,-5,7,4}};MatrixForm[A]

b={{(236/10)},{(457/10)},{(299/10)}}

LinearSolve[A,b]

In this case, among the infinite solutions of the system, Mathematica gives a solution of the system where (Subscript[x, 4])=0. We can obtain these infinite solutions by expressing the augmented matrix in reduced row echelon form. First, we enter the augmented matrix as Ao.

Ao={{1,-2,5,-3,(236/10)},{1,4,-7,-2,(457/10)},{3,-5,7,4,(299/10)}};
MatrixForm[Ao]

Next, we find the reduced row echelon form of the augmented matrix and call it A1.

A1=RowReduce[Ao];MatrixForm[A1]

From the above, we see that  (Subscript[x, 4]) is a free variable. Thus, the solution is given by  (Subscript[x, 4])=t,  (Subscript[x, 3])=535/72+77/36 t,  (Subscript[x, 2])=1669/90+37/9 t, and  (Subscript[x, 1])=8473/360+19/36 t. In particular, if we use t=0, we get a  solution  of the system as  (Subscript[x, 4])=0,  (Subscript[x, 3])=535/72,  (Subscript[x, 2])=1669/90, and  (Subscript[x, 1])=8473/360, which was the solution obtained previously using the command LinearSolve.

d)  We first enter the coefficient matrix A and the constant matrix b.

A=(({{2, 1, 1, -2}, {3, -2, 1, -6}, {1, 1, -1, -1}, {6, 0, 1, -9}, {5, -1, 2, -8}}))

b=(({{1}, {-2}, {-1}, {-2}, {3}}))

LinearSolve[A,b]

The above indicates that the system has no solution. We can check this by obtaining the reduced row echelon form of the augmented matrix as follows.

Ao=(({{2, 1, 1, -2, 1}, {3, -2, 1, -6, -2}, {1, 1, -1, -1, -1}, {6, 0, 1, -9, -2}, {5, -1, 2, -8, 3}}))

A1=RowReduce[Ao];MatrixForm[A1]

The fourth row of the above matrix shows that the system has no solution (do you see why?).

Example 6: Determine the value of the parameter a for which the linear system: 
					({{(3+a)x+2y+3z=4}, {         -x+ y  -  z=-2 }, {             y+ a z=0}})
  is inconsistent.

Solution:  	First, we form the augmented matrix A. Then, we apply elementary row operations on A.

Clear[a]
A=(({{3+a, 2, 3, 4}, {-1, 1, -1, -2}, {0, 1, a, 0}}))

Interchange rows 1 and 2 of matrix A and denote the resulting matrix by A1.

A1={A[[2]],A[[1]],A[[3]]}
MatrixForm[%]

Next, we multiply row 1 of matrix A1  by -1 to obtain matrix A2.

A2={-A1[[1]],A1[[2]],A1[[3]]}
MatrixForm[%]

Myltiply  row 1 of matrix A2 by -(3+a)  and add it to row 2 of A2 to get matrix A3.

A3={A2[[1]],-(3+a)*A2[[1]]+A2[[2]],A2[[3]]}
MatrixForm[%]

We  interchange rows 2 and 3 of A3 to obtain matrix A4.

A4={A3[[1]],A3[[3]],A3[[2]]}
MatrixForm[%]

We now multiply row 2 of A4  by - (5+a) and add it to row 3 of A4. This gives matrix A5.

A5={A4[[1]],A4[[2]],-(5+a)*A4[[2]]+A4[[3]]}
MatrixForm[%]

Simplify[%]
MatrixForm[%]

From the above matrix, we see that the system is inconsistent when  a = 0,   a= -6  or a= -1. (Do you see why?)

Chapter Three		Determinants

Example 1:  Let A  be the matrix given by   A=  (({{2, 1, -3}, {0, 4, 5}, {-1, 3, 2}})).

a)	 Find  Det(A).

b)  	Show that Det((A^T)) = Det(A)

c) 	Verify that Det(2A) = (2^3) Det(A)

d) 	Let (Subscript[A, 1])  be the matrix that is obtained by interchanging rows 1 and 2 of A. Show that Det((Subscript[A, 1])) =  -  Det(A).

e) 	Let (Subscript[A, 2])  be the matrix that is obtained from A by replacing the third row of A by the sum of row 3 and 5 times row 1. Show that  Det((Subscript[A, 2])) = Det(A).

Solution:  	We first enter the matrix A.

A={{2,1,-3},{0,4,5},{-1,3,2}};MatrixForm[A]

a)  Next, we evaluate the determinant of A:

Det[A]

b)  We evaluate the determinant of Transpose[A]:

Det[Transpose[A]]

c)  We find the determinant of 2A and compare it with 8 times the determinant of A.

Det[2 A]

2^3 Det[A]

d) We first define matrix A1, the matrix obtained by interchanging rows 1 & 2 of A. Then, we evaluate its determinant.

A1={A[[2]],A[[1]], A[[3]]};MatrixForm[A1]

Det[A1]

e) The matrix A2 obtained by adding 5 times row 1 to row 3 of A is given by:

A2={A[[1]],A[[2]],5A[[1]]+A[[3]]};MatrixForm[A2]

Det[A2]

Example 2:  Redo Example 1  if  A  is an arbitrary  3x3 matrix.

Solution:  We first enter a general 3x3 matrix A.

A =(({{(Subscript[a, 11]), (Subscript[a, 12]), (Subscript[a, 13])}, {(Subscript[a, 21]), (Subscript[a, 22]), (Subscript[a, 23])}, {(Subscript[a, 31]), (Subscript[a, 32]), (Subscript[a, 33])}}))

a) The determinant of A is given by:

Det[A]

b)  To show that Det[Transpose A] = Det[A], we compute

Det[Transpose[A]]-Det[A]

c)  To show that Det[2A] = 8 Det[A], we compute

Det[2 A]-8 Det[A]

It is not clear why the above is equal to zero and so we:

Simplify[%]

d)  First we enter matrix A1 that is obtained by interchanging rows 1 & 2 of A.

A1={A[[2]],A[[1]],A[[3]]};MatrixForm[A1]

To show that Det[A1] = -Det[A], we compute

Det[A1]+Det[A]

e)  The matrix A2, obtained by adding 5 times row 1 to row 3 of A, is given by:

A2={A[[1]],A[[2]], 5A[[1]]+A[[3]]};MatrixForm[A2]

To show that Det[A2] = Det[A], we calculate

Det[A2]-Det[A]

Chapter Four 		Vectors and Vector Spaces

4.1  Vector Algebra

Vectors are typed in braces with commas between components. For example if a is the vector  a= i+3j -5k we type

a={1,3,-5}

Vector addition, subtraction and scalar multiplication are perfomed in the same way as the corresponding operations on numbers.The dot product of vectors a and b is obtained by  a.b  and the length of a is obtained by using the command Sqrt[a.a].

Example 1:  Let  a= i+3j -5k and  b= -i+2j +3k.  Find 3a-2b, a.b, and ||b||.

Solution: 	First we will enter the components of a and b as lists. Then, we enter the solutions for all the problems in one cell:

a={1,3,-5}
b={-1,2,3}

3a-2b 
a.b 
Sqrt[b.b]

Example 2:  Show that the dot product of vectors  is commutative and that dot product is distributive over addition, that is , a.b= b.a  and a.(b+c)=a.b+a.c for any  vectors a ,b and c.

Solution:  We will verify the above properties for vectors in space.

Clear[a,b,c,a1,a2,a3,b1,b2,b3,c1,c2,c3]
a={a1,a2,a3}
b={b1,b2,b3}
c={c1,c2,c3}
a.b-b.a (*if this is equal to 0, this proves the
 distributive property*)
a.(b+c)-(a.b+a.c) (*if this is equal to 0, this proves the
 distributive property*)

It is not clear why the last output is zero. We check this by entering:

Simplify[%]

Example 3:  Let  u= i+3j + 2k,  v= 2i+3 j  and w = -2i+3j +4k. Find  u × v and (u × v).w

Solution: 	In order to calculate the cross product of two vectors we need a package, called  Calculus`VectorAnalysis`.  It is recommended that you  load this package before starting your work.  The command to load  this package is  Needs["Calculus`VectorAnalysis`"].  To compute the cross product u × v of  u  and  v we type Cross[u,v].  In Mathematica 3.0, there is a   palette that contains the command for cross product. It is in File-Palettes-Lists and Matrices-Matrix  Operations and is denoted by Cross[□ ,□]. First, we  load the package:

Needs["VectorAnalysis`"]

u={1,3,2}
v={-2,3,0}
w={-2,3,4}

prod= CrossProduct[u,v]
prod.w

Thus, we see that u x v = -6i - 4j + 9k  and (u x v ) . w = 36.

Example 4: Consider the parallelepiped  with sides a=i+k, b=2i+j+3k  and c=i+j-2k.  
a)   Find the volume.		b)  Find the area of the face determined by  b and  c.

Solution:

a={1,0,1}
b={2,1,3}
c={1,1,-2}
volume=Abs[a.Cross[b,c]]
area=((Sqrt[Cross[b,c].Cross[b,c] ])/2)

Hence, the volume of the parallellepiped is 4 and the area of the face determined by vectors b and c is 5  (Sqrt[3])/ 2

4.2  Linear Independence and Span

Example 5:  If S={(Subscript[p, 1])(t),  (Subscript[p, 2])(t), (Subscript[p, 3])(t)}={t-1, t+1, (t^2)+t+1}, determine whether p(t)= 2 (t^2) + t - 2 belongs to the span of S.

Solution:	We find scalars (Subscript[c, 1]), (Subscript[c, 2]),and  (Subscript[c, 3]) such that (Subscript[c, 1])(Subscript[p, 1])(t) +  (Subscript[c, 2])(Subscript[p, 2])(t) +  (Subscript[c, 3])(Subscript[p, 3])(t) = p(t).  This is equivalent to solving a system of linear equations with augmented matrix:

A=(({{0, 0, 1, 2}, {1, 1, 1, 1}, {-1, 1, 1, -2}}))

The reduced row echelon form of A is obtained by:

RowReduce[A]//MatrixForm

The above shows that  (Subscript[c, 1])= 3/2,  (Subscript[c, 2]) = - 5/2  and (Subscript[c, 3]) =  2 and so p(t) belongs to the span of S.

Example 6:  Determine if   S ={(1,1,-1),  (1, 7, 2),  (0, 4, 2),  (2, 8, 1) }  spans (R^3).

Solution:  Given any vector (a,b,c)  in   (R^3),  we have to check if there exist scalars  (Subscript[c, 1]),  (Subscript[c, 2]),  (Subscript[c, 3]),  and (Subscript[c, 4]) such that:
(Subscript[c, 1 ])(1, 1, -1)  +  (Subscript[c, 2]) (1, 7, 2)  +  (Subscript[c, 3]) (0, 4, 2)  +  (Subscript[c, 4]) (2, 8, 1)   =  (a, b, c).
This leads to solving a system of equations whose augmented matrix is given by:

Clear[a,b,c]
A = (({{1, 1, 0, 2, a}, {1, 7, 4, 8, b}, {-1, 2, 2, 1, c}}))

Now, we use elementary row operations on A to solve the system. Add -1 times  row 1 to row 2 and add row 1 to row 3 to obtain matrix A1.

A1={A[[1]], -A[[1]]+A[[2]], A[[1]]+A[[3]]}
MatrixForm[%]

Next, we divide row 2 of  A1 by 6 to get a leading 1. We denote the resulting matrix by A2.

A2={A1[[1]],A1[[2]]/6, A1[[3]]}
MatrixForm[%]

Next, we multiply row 2 of A2 by -3 and add it to row 3 and denote the resulting matrix by A3.

A3={A2[[1]], A2[[2]], -3A2[[2]]+A2[[3]]}
MatrixForm[%]

The last row of the above matrix shows that the vectors do not span (R^3) . (do you see why?)

Example 7:  Determine if S={ (1, 1, 0, 0),  (2, 1, 1, -1),  (0, 0, 1, 1),  (1 , 2, 1, 2)} is a basis of (R^4) .

Solution:	Since we know that the dimension of (R^(4 )) is 4 and S contains 4 elements, it suffices to check whether or not S is linearly independent. Thus, we consider a solution of the system of equations   (Subscript[c, 1 ]) (Subscript[v, 1  ])+  (Subscript[c, 2]) (Subscript[v, 2])  +(Subscript[c, 3])  (Subscript[v, 3 ]) + (Subscript[c, 4])(Subscript[v, 4])= 0 .  Thus the augmented  matrix, A , of the system of equations has the given vectors as column vectors(do you see why?) and so:

A=(({{1, 2, 0, 1, 0}, {1, 1, 0, 2, 0}, {0, 1, 1, 1, 0}, {0, -1, 1, 2, 0}}))

RowReduce[A]//MatrixForm

The above shows that (Subscript[c, 1]) =(Subscript[c, 2 ]) = (Subscript[c, 3])   = (Subscript[c, 4])  = 0 and so S is linearly independent. Hence S forms a basis of (R^4).

4.3  Null Space and Rank of a Matrix

Example 8:  Let	A= (({{2, 1, 2, 0}, {0, 0, 0, 0}, {1, 2, 2, 1}, {4, 5, 6, 2}, {3, 3, 4, 1}})).

a)  Find a basis for the null space of A. Also, find the nullity of A and the rank of A.

b)  Find a basis for the row space of A consisting of vectors that are not row vectors of A.

c)  Find a basis for the row space of A consisting of vectors that are  row vectors of A.

d)   It can be shown that v = (7, 11, 12, 5) is in the row space of A. Express v as a linear combination of the basis elements obtained in b) and c) above.

Solution: 	We first enter the matrix as:

A= (({{2, 1, 2, 0}, {0, 0, 0, 0}, {1, 2, 2, 1}, {4, 5, 6, 2}, {3, 3, 4, 1}}))

The command NullSpace[A] gives a basis for the null space of A, and so we find:

NullSpace[A]

This shows that a basis for the null space of A is {(1, -2, 0, 3),  (-2, -2, 3, 0)} and so the nullity is 2. Hence, the rank of the matrix is given by  4 - nullity of A = 2. (Do you see why?

b)  To find a basis for the row space of A consisting of vectors that are not row vectors of A, we find the nonzero vectors in the reduced row echelon form of A and so we calculate:

RowReduce[A]//MatrixForm

Thus, a basis for the row space of A is given by {(1, 0, 2/3, -1/3),  (0, 1, 2/3, 2/3)}.

c) To find a basis for  the row space of A consisting of row vectors of A, we find the reduced row echelon form of the transpose of A.

RowReduce[Transpose[A]]//MatrixForm

The leading 1's occur in columns 1 and 3. Hence,  the vectors corresponding to columns 1 & 3 of the transpose of A form a basis of the row space of A. Thus, a basis is  { (2,1,2,0), (1,2,2,1)}.

d) Using the "natural basis" obtained in a): We see that the leading 1's in the reduced row echelon form of A occur at columns 1 and 2. Thus, v= (7, 11, 12, 5) = 7 (1, 0, 2/3, -1/3) +11 (0, 1, 2/3, 2/3). For the basis obtained in b) above, we have to find scalars a and b such that a (2, 1, 2, 0) + b ( 1, 2, 2, 1) = v= (7, 11, 12, 5). This leads to a system of equations whose augmented matrix is B, given by:

B=(({{2, 1, 7}, {1, 2, 11}, {2, 2, 12}, {0, 1, 5}}))
RowReduce[B]//MatrixForm

Thus, we see that a = 1 and b = 5 and so v = (7, 11, 12, 5) =  (2, 1, 2, 0) + 5 (1, 2, 2, 1).

4.4 Transtion Matrix

Example 9 :  In (R^3) consider the bases S and T  given by:
 S = {(Subscript[v, 1  ]),  (Subscript[v, 2]), (Subscript[v, 3]) } ={ (1, 1, 0),  (1, 0, 1),  (1, 1, 1)}  and T = { (Subscript[w, 1]),  (Subscript[w, 2]), (Subscript[w, 3])} ={ (1, 2, 1),  (1, 2, 0),  (1,0,2)} .

a) Find the transition matrix P from the T-basis to the S-basis.

b) Let v be a vector whose coordinates with respect to the T-basis is (Subscript[[v], T])  =  (-1,2,5). Find the coordinates of v with respect to the S-basis by using the transition matrix P.

Solution: 	We proceed by finding the coordinates of the basis  vectors (Subscript[w, 1]), (Subscript[w, 2]), and (Subscript[w, 3])  with respect to the S-basis. This computation requires that we solve 3  linear systems  whose coefficient matrix is composed of the vectors from the S-basis and  the constant matrix  is a column matrix with entries from  (Subscript[w, 1]), (Subscript[w, 2]), and (Subscript[w, 3]). So we consider the augmented matrix:

A=(({{1, 1, 1, 1, 1, 1}, {1, 0, 1, 2, 2, 0}, {0, 1, 1, 1, 0, 2}}))

RowReduce[A]
MatrixForm[%]

Hence the transition matrix is given by:
						P = (({{0, 1, -1}, {-1, -1, 1}, {2, 1, 1}})).

b) In order to find the coordinates of v with respect to the S-basis, we use the equation: (Subscript[[v], S]) = P . (Subscript[[v], T]). Hence the coordinates of v with repect to the S-basis is given by:

(({{0, 1, -1}, {-1, -1, 1}, {2, 1, 1}})) . (({{-1}, {2}, {5}}))

We can verify our work by computing:(do you see why?)

( -1{1,2,1}+2{1,2,0}+5{1,0,2} ) -
	(-3{1,1,0}+4{1,0,1}+5{1,1,1})

4.5 The Gram-Schmidt Orthogonalization Process

For many purposes, the most convenient type of basis for a vector space is an orthonormal basis, i.e., the vectors are of unit length and are pairwise orthogonal. The Gram-Schmidt procedure takes an arbitrary basis of (R^n) and generates an orthonormal one. Given a basis {(Subscript[v, 1]), (Subscript[v, 2]), ...,  (Subscript[v, n])} of (R^n) , an orthonormal basis is obtained by using the command  GramSchmidt[{(Subscript[v, 1]), (Subscript[v, 2]), ...,  (Subscript[v, n])}].

Example 10: Cosider the basis  S={(Subscript[u, 1]),  (Subscript[u, 2]), (Subscript[u, 3 ])} for (R^3) ,   where  (Subscript[u, 1  ]) = (1,1,1),  (Subscript[u, 2]) =  (-1, 0, -1),  and  (Subscript[u, 3 ]) =(-1,2,3).

a) Use the Gram-Schmidt process to transform S into an orthonormal basis for (R^3).

b) Express v=(-1, 2, 0) as a linear combination of the orthonormal basis obtained in a) above, i.e., find the coordinates of v with respect to the orthonormal basis.

Solution:  	First, we  load the  package  to use the Gram-Schmidt process.

<<LinearAlgebra`Orthogonalization`

If  we denote the orthonormal basis, obtained  from the given basis S, by  w1, w2, and w3,  then we obtain

{w1,w2,w3}=Orthogonalize[{{1,1,1},{-1,0,-1},{-1,2,3}},Method->"GramSchmidt"]

The above gives an orthonormal basis. Thus, the dot product of each pair of different vectors is zero and each vector has length 1. We can verify this by computing the dot products as follows.

{w1 . w2, w1 . w3, w2 . w3, w1 . w1, w2 . w2, w3 . w3}

b)  To find the coordinates of v with respect to the orthonormal basis obtained above, we find  real numbers a, b, and c such that a w1 + b  w2 + c w3 = v. Recall that if a basis is orthonormal, then the coordinates a, b, and c are obtained by computing the dot products  v.w1, v.w2, and v.w3, repectively.  We obtain this as follows.

v={-1, 2, 0}

{a, b, c} ={v . w1,  v . w2, v.w3}

Simplify[%]

The above gives the values of a, b, and  c,  respectively.  We can check the above result by computing:

a *w1+b*w2+c*w3

It is not clear why the above is equal to v =(-1, 2, 0) and so we:

Simplify[%]

Example 11: Let W be the subspace of (R^4) with basis S={(Subscript[u, 1]),  (Subscript[u, 2]), (Subscript[u, 3 ])}  where 
(Subscript[u, 1  ]) = (1, -2, 0, 1),  (Subscript[u, 2]) =  (-1, 0, 0, -1),  and  (Subscript[u, 3 ]) =(1,1,0, 0). Use the Gram-Schmidt process to find an orthonormal basis for W.

Solution:  	An orthonormal basis of W is obtained by:

Orthogonalize[{{1,-2,0,1},{-1,0,0,-1},{1,1,0,0}},Method->"GramSchmidt"]

Chapter Five 		Eigenvalues and Eigenvectors

5.1  Eigenvalues, Eigenvectors, Diagonalization

If A is a square matrix of size n, then the command Det[A - λ* IdentityMatrix[n]] gives the characteristic polynomial of A. The command Eigenvalues[A] gives the eigenvalues of A. Repeated eigenvalues are represented as many times as the algebraic multiplicity indicates. Eigenvectors are obtained by the command Eigenvectors[A].

Example 1:  Find the characteristic polynomial, the eigenvalues and the corresponding eigenvectors of  
						A=(({{1, 2, -1}, {1, 0, 1}, {4, -4, 5}})). 
Is A diagonalizable? If so, find a diagonal matrix D and an invertible matrix P such that  (P^(-1))A P = D.

Solution:

A=(({{1, 2, -1}, {1, 0, 1}, {4, -4, 5}}))

We obtain the characteristic polynomial ,  f (λ),  as follows.

f[ λ] = Det[A - λ* IdentityMatrix[3]]

We can obtain the eigenvalues by solving for the roots of the characteristic polynomial. We do this as follows.

Solve[ f[ λ]  == 0,  λ]

From the above, we see that there are 3 real eigenvalues: 1, 2, and 3.  We can also find the eigenvalues and eigenvectors as follows.

Eigenvalues[A]

Eigenvectors[A]

Thus, the matrix has three eigenvalues: 1, 2,  & 3 and three eigenvectors: (-1, 1, 2), (-2, 1, 4), and (-1, 1, 4). However, the eigenvalues and eigenvectors may not appear in corresponding order. Thus, to find both the eigenvalues and their corresponding eigenvectors, we use the command:

Eigensystem[A]

This shows that 1 is an eigenvalue of A and (-1, 1, 2) is the corresponding eigenvector. Similarly, for the eigenvalue 2, an eigenvector is (-2,1,4) ; for the eigenvalue 3 an eigenvector is (-1, 1, 4). We can verify this by computing:

A.(({{-1}, {1}, {2}})) - (({{-1}, {1}, {2}}))
A.(({{-2}, {1}, {4}})) - 2 (({{-2}, {1}, {4}}))
A.(({{-1}, {1}, {4}})) - 3(({{-1}, {1}, {4}}))

Since A has distinct  eigenvalues, A is diagonalizable. If  we now let P be the matrix whose columns are the eigenvectors, then  (P^(-1))A P = D, where  D is the diagonal matrix whose diagonal entries are the respective eigenvalues. We verify this as follows.

P= (({{-1, -2, -1}, {1, 1, 1}, {2, 4, 4}}))
Inverse[P].A.P
MatrixForm[%]

Example 2:  Let A = (({{4, 2, 3}, {2, 1, 2}, {-1, -2, 0}})). Find the eigenvalues and corresponding eigenvectors of A. Also, if A is diagonalizable , find an invertible  matrix P and a diagonal matrix D  such that (P^(-1)) A P = D.

Solution:

A=(({{4, 2, 3}, {2, 1, 2}, {-1, -2, 0}}))
Eigensystem[A]

The above shows that A has two eigenvalues λ = 1 and λ = 3. The eigenvalue λ =1 has multiplicity 2. However, the eigenspace for λ =1 has dimension 1.  Thus A is not diagonalizable.

Example 3:  Let A = (({{0, 0, -2}, {1, 2, 1}, {1, 0, 3}})). Find the eigenvalues and corresponding eigenvectors of A. Also, if A is diagonalizable , find an invertible  matrix P and a diagonal matrix D  such that (P^(-1)) A P = D.

Solution:

A=(({{0, 0, -2}, {1, 2, 1}, {1, 0, 3}}))
Eigensystem[A]

The above shows that A has two eigenvalues λ = 1 and λ=2. The eigenvalue λ =2 has multiplicity 2 and has two eigenvectors (-1,0,1)  and (0,1,0), which are clearly linearly independent(do you see why?). In other words, the eigenspace for  λ =2 has dimension =2. Thus A is diagonalizable,  P is the matrix whose columns are the eigenvectors of A, and D is the diagonal matrix whose diagonal entries are the eigenvalues of A. We verify this as follows:

P=(({{-2, -1, 0}, {1, 0, 1}, {1, 1, 0}}))
Inverse[P].A.P
MatrixForm[%]

5.2  Diagonalization of Symmetic Matrices

Example 4: Find an orthogonal matrix P that diagonalizes the symmetric matrix:	 A= (({{1, -4, 2}, {-4, 1, -2}, {2, -2, -2}})).

Solution: 	First, we find the eigenvalues and corresponding eigenvectors of A.

A =(({{1, -4, 2}, {-4, 1, -2}, {2, -2, -2}}))
Eigensystem[A]

Next, for each eigenvalue, we find an orthonormal basis of the eigenspace using the Gram-Schmidt Orthogonalization Process. First, we consider the eigenspace for  the eigenvalue λ = -3 which has dimension 2. An orthonormal basis of its eigenspace is given by w1, w2 where

<<LinearAlgebra`Orthogonalization`

{w1,w2}=Orthogonalize[{{-1,0,2},{1,1,0}},Method->"GramSchmidt"]

For the eigenvlaue λ=6, the eigenspace has dimension 1 and an orthonormal basis is given by w3:

{w3}=Orthogonalize[{{2,-2,1}},Method->"GramSchmidt"]

Recall that the diagonalizing matrix P is  the matrix whose column entries are the orthonormal basis of the eigenspaces. Thus, matrix P is given by:

P= (({{-1/(Sqrt[5]), 4/(3(Sqrt[5])), 2/3}, {0, (Sqrt[5])/3, -2/3}, {2/(Sqrt[5]), 2/(3(Sqrt[5])), 1/3}}))

We verify that P is an orthogonal matrix by computing:

Inverse[P] - Transpose[P]

Finally, we show that P is a diagonalizing matrix by computing:

Inverse[P].A.P

It is not clear that this is a diagonal matrix whose diagonal entries are the eigenvalues of A and so we :

Simplify[%]//MatrixForm

Exercises

1	Consider the following system of linear equations.
			({{4x-3y+2z-w = -5}, {2x+y-3z              =   7}, {-x+4y+z+2w =    8}})
 
a) 	Use the command  LinearSolve[A,b]   to find the solutions of the above system.
 
b) 	Express the augmented matrix in reduced row echelon form and find the solutions of the system of equations.

2.	Let A=(({{1, -2, 3}, {-1, 3, 0}, {2, -5, 5}})) and b=(({{9}, {-4}, {1}})). Solve the system A X= b.

3.	Let B=(({{1, 3, 4, -5}, {2, -3, 5, 6}, {4, 9, -6, 7}}))	Find the matrices that are obtained by performing the following row operations in succession on matrix B.

	a)  	Multiply row 1 by 2.
	
	b)	Add 3  times row 1 to row 2.
	
	c)	Add -4  times row 1 to row 3.
	
	d)	Interchange rows 2 and 3.

4.	For what values of a does the following system of equations have no solution, a unique solution or infinitely many solutions?

			({{x-y+z=1}, {x+3y+a z=2}, {2x+a y+3z=3}})

5.	Let A=(({{1, 2, 3, 4}, {2, 0, -1, 3}, {2, -5, 5, 1}}))	B=(({{1, 2, 3, 4}, {6, 8, 5, 19}, {4, -5, 4, 4}}))	  	
		
		C=(({{4, 1, 4, 4}, {2, 0, -1, 3}, {2, 4, 6, 8}}))	D=(({{-4, 10, -10, -2}, {2, 0, -1, 3}, {2, 4, 6, 8}}))	
		
	i)	Find 	a)   A-3B		b)    (C^T)D		c)   B((A^T)+(D^T))		
	
	ii)	Use the RowReduce command to detrmine which of the above matrices are row equivalent.

6.	Let F=(({{0, 1, 0, 0}, {-1, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}})). 
a)	Find the smallest positive integer  k so that (F^k)= F.  [  Hint:   Note that the command  MatrixPower[F,n]  gives (F^n).]

b)	Assume that  F is nonsingular. Use the result in a) to find the smallest value of n for which (F^(-1))=(F^n).

7.	Let A=(({{1, (1/3)}, {0, (1/4)}})). Find (A^2), (A^3), and (A^8). Can you guess what (A^n)is?. Verify your guess.

8.	If S={(Subscript[p, 1])(t),  (Subscript[p, 2])(t), (Subscript[p, 3])(t)}={t, 2t+1, (t^2)+t}, determine whether p(t)= 2 (t^2) + t - 2 belongs to the span of S.

9.	Determine if   S ={(({{2}, {1}, {0}})), (({{-1}, {0}, {3}})), (({{-4}, {1}, {8}})),  (({{0}, {1}, {1}})) }  spans (R^3).

10.	Determine if  S ={(({{1}, {0}, {2}, {0}})), (({{2}, {1}, {-1}, {-1}})), (({{1}, {0}, {2}, {0}})),  (({{1}, {3}, {-1}, {4}})) } is a basis of (R^4) .

11.	In (R^3) consider the bases S and T  given by:
 	S = {(Subscript[v, 1  ]),  (Subscript[v, 2]), (Subscript[v, 3]) } ={ (({{1}, {1}, {1}})),  (({{1}, {1}, {0}})),  (({{0}, {1}, {-2}}))} 
 and T = { (Subscript[w, 1]),  (Subscript[w, 2]), (Subscript[w, 3])} ={ (({{2}, {1}, {-1}})),  (({{1}, {0}, {1}})),  (({{0}, {-1}, {2}}))} .

a) Find the transition matrix P from the T-basis to the S-basis.

b) Let v be a vector whose coordinates with respect to the T-basis is (Subscript[[v], T])  =  (({{-1}, {2}, {5}})). Find the coordinates of v with respect to the S-basis by using the transition matrix P.

12.	 Cosider the basis  S={(Subscript[u, 1]),  (Subscript[u, 2]), (Subscript[u, 3 ])} for (R^3) ,   where  (Subscript[u, 1  ]) =(({{1}, {1}, {1}})), (Subscript[u, 2])=  (({{1}, {1}, {0}})), and    (Subscript[u, 3])=(({{0}, {1}, {-2}}))

a) Use the Gram-Schmidt process to transform S into an orthonormal basis for (R^3).

b) Express v=(({{-1}, {2}, {0}})) as a linear combination of the orthonormal basis obtained in a) above, i.e., find the coordinates of v with respect to the orthonormal basis.

13.	 Let W be the subspace of (R^4) with basis S={(Subscript[u, 1]),  (Subscript[u, 2]), (Subscript[u, 3 ])}  where 
(Subscript[u, 1  ]) = (({{1}, {0}, {2}, {1}})),  (Subscript[u, 2]) =  (({{-1}, {0}, {1}, {0}}))  and  (Subscript[u, 3 ]) =(({{1}, {1}, {0}, {1}})). Use the Gram-Schmidt process to find an orthonormal basis for W.

14.	Let  a= -i+3j -k and  b= i-2j +5k.  Find 3a-2b, a.b, and ||b||.

15.	  Let A  be the matrix given by   A=  (({{2, 7, 3}, {1, 6, 1}, {3, 4, 5}})).

a)	 Find  Det(A).

b)  	Show that Det((A^T)) = Det(A)

c) 	Verify that Det(2A) = (2^3) Det(A)

d) 	Let (Subscript[A, 1])  be the matrix that is obtained by interchanging rows 1 and 2 of A. Show that Det((Subscript[A, 1])) =  -  Det(A).

e) 	Let (Subscript[A, 2])  be the matrix that is obtained from A by replacing the third row of A by the sum of row 3 and 5 times row 1. Show that  Det((Subscript[A, 2])) = Det(A).

16.	Let A = (({{1, 0, 0}, {-1, 3, 0}, {3, 2, -2}})). Find the eigenvalues and corresponding eigenvectors of A. Also, if A is diagonalizable , find an invertible  matrix P and a diagonal matrix D  such that (P^(-1)) A P = D.