



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
math math 123 mathmath math 123 mathmath math 123 math
Typology: Exercises
1 / 6
This page cannot be seen from the preview
Don't miss anything!
In this class we will further investigate the determinant of a matrix and use some of the graphics capabilities of MATLAB.
A fundamental property of determinants is that they are unchanged by the elementary row operation of adding a multiple of one row to another row. We will make use of this property to investigate how determinants relate to areas and volumes. MATLAB allows us to explore this from graphical and numerical perspectives.
You will need to use the m-files that you downloaded into MATLAB during Computer Lab 3. If you do not have the m-files, then follow the instructions on the Computer Lab Class Files page of the MAST10007 website to load the Linear Algebra m-files into MATLAB.
The table below lists some commands that you will need today plus others that relate to the material in lectures.
To complete the table, you will need to enter the following matrices into MATLAB:
[ 2 1 3 − 1
] x =
y^ =
u =
[ 2 3
] v =
[ 1 − 1
] w =
[ − 3 1
] z =
[ − 2 1
]
Then use the command B=[u;v] and C=[w;z] to obtain two 2 × 2 matrices.
Complete the following table:
Command Meaning Result of calculation det(A) The determinant of A
dot(x,y) The dot product: x · y
cross(x,y) The cross product x × y
pgram1(B)
Draws the parallelogram with u and v on two sides where B has the vectors u and v in its rows.
pgram2(B,C)
Draws two parallelograms, the first in blue bounded by u and v from the rows of B and the second in red bounded by w and z from the rows of the matrix C.
As well as the commands above you may find the following useful. (Do not test them now.)
Command Meaning
hold on Tells MATLAB to draw the next graph on the sameset of axes as the previous graph.
hold off Tells MATLAB to start a new graph deleting theprevious graph.
figure(2) Tells MATLAB to start a new graph called Figure 2.Does not delete Figure 1. Can have figure(3) etc.
Reminder You will be using commands more than once in this class. Remember that you can use the up arrow to select a previous command, and change some of it if necessary. You can also copy and paste from the command history window to the command window.
Exercise 1: Graphical Investigation: Area of a Parallelogram
(a) Let u = [4 2], v = [2 3] and A =
[ 4 2 2 3
] (A=[u;v]). Use the command det(A) to find the determinant
of A. Check your answer by hand.
det( A ) =
Use pgram1(A) to draw the parallelogram bounded by u and v.
(b) Now find w = v − α u with α = 1_._ 5.
Put u and w into the rows of a matrix B.
What row operation was used to obtain B from A?
What is the determinant of B?
How does it compare to the determinant of A?
Use pgram2(A,B) to draw the parallelograms bounded by u and v and by u and w.
Thinking of u as the base of the parallelograms what do you notice about the height and hence the areas of the two parallelograms?
(e) Start with the matrix A and do a single row operation (by hand) to make the bottom-left entry become
[ 4 2 0 ___
] R 2 → R 2 − ___ R 1
Now do another single row operation on B to make the top-right entry become 0. Call this matrix C.
[ ____ 0 0 ___
] R 1 → R 1 − ___ R 2
Find the determinants of A , B and C.
What do you notice about these determinants?
In MATLAB enter pgram2(A,B);figure(2);pgram2(B,C) and study the resulting figures carefully.
What do you notice about the areas of the various parallegrams?
What is the area of the parallelogram spanned by the vectors u and v?
How does the determinant of A relate to this area?
(f) If you swap the rows of A how does this affect the area spanned by the vectors in the rows of A? How does it affect the determinant?
(g) Based on your experiment above, develop a working hypothesis as to the relationship between the determinant of a 2 × 2 matrix and the area of the parallelogram spanned by the vectors in the rows of the matrix.
Exercise 2: Volume of a Parallelepiped in R^3
Choose Clear Workspace from the toolbar so that all previous vectors and matrices are deleted.
Let u = (3 , 0 , 0), v = (0 , − 2 , 0), w = (0 , 0 , 2) and A =
.
(a) Enter u , v and w into MATLAB as row vectors. Enter A into MATLAB using the command A=[u;v;w]
To draw the parallelepiped spanned by the vectors that make up the rows of A try the command ppped1(A). The program produces a matrix and a parallelepiped in the figure window. Draw the resulting parallelepiped.
What is the volume of this parallelepiped?
What is the determinant of A?
(b) Add any multiple of u to w to get a new vector x. Put u , v and x into the rows of a matrix B. Write down B. What is det( B )?
Try the command ppped2(A,B) If you click on at the top of the figure window, you can use the mouse to rotate the figure to see it more clearly.
Notice that the base and height of A and B are the same. What do you conclude about the volumes of the two parallelepipeds?
How do the volumes relate to the determinants?
Try adding a multiple of v to w to get x and again draw the parallelepipeds and find the determinants.
Use a few other multiples of u and v and see what happens. What do you notice?