Page 1 of 2
MATH 240 – SPRING 2016
What to turn in: For this project you will need to turn in a printout of your published m-file.
Use a YourName_MATH240_Proj2.m file to save your code in an .m file. Use the command
PUBLISH(FILE,FORMAT) (or similar) to publish your work in word or pdf format (while you
are at it, play to see what other formats you can get). Make sure that you have enough comments
and results shown so that another person (me or the TA) can understand what you are doing).
Use %% notation to differentiate in cells the problems in this homework. This way you can even
run/debug one problem at a time.
Please apply the instructions from Project 1 about working in teams and labeling your project.
Remember to use the command lookfor *&% when trying to find the MATLAB command whose
description contains *&%.
MATLAB PROJECT 2:
The goals of this project are: (1) to learn more about how to quickly generate matrices using
MATLAB functions; (2) practice different ways of computing the inverse and use the properties
of determinants; (3) practice your understanding of the standard matrix of a linear
transformation; (4) interpret and explain the results generated by MATLAB.
PROBLEM 1: Use MATLAB commands to efficiently (i.e. without keying each entry) enter the
matrix:𝑆 =
[ 0 0 7 0 2 0 0 0 3 0 0 0 0
0 0 0
0 0 1 0 0 0 0 0 0]
. Hint: Try help diag and represent S as the sum of two matrices
having non-zero entries on different diagonals.
a) Compute S k for k=2,3,4. Describe in words what happens when computing S
k .
b) By using this reasoning, what do you expect S 11
to be?
c) As part of a linear algebra quiz, your friend answers 'TRUE' to the question: Is it true or false
that : If A*B=0 then one of the matrices A or B is the zero matrix? Based on your computations
above, do you agree with him?
PROBLEM 2: Suppose a linear transformation T has the property that T([1;3])=[5;4], and
T([2;1])=[3;6] where [1;3] is, as in MATLAB, the column vector with entries 1 and 2. Let A
denote the standard matrix of T.
Page 2 of 2
a) The information above tells you that there are matrices U and V such as 𝐴 ∗ 𝑈 = 𝑉.
Define U and V. Hint: read the problem until the end.
b) Using inv(U), V and matrix multiplication, compute A.
c) Verify that you have the correct A by computing in MATLAB 𝐴 ∗ [1;3] and 𝐴 ∗ [2;1] and
comparing with the values of T([1;3]) and T([2;1]), respectively.
d) Compute the expression det 𝐴 ∙ det 𝑈 − det 𝑉 . What general fact does this calculation
illustrates?
e) Compute det (𝐴 + 𝑈) − (det 𝐴 + det 𝑈). What general fact does this calculation
illustrates?
PROBLEM 3: Let 𝐴𝑛 be the 𝑛 × 𝑛 matrix with 1 on the main diagonal and 2 elsewhere.
a) For 𝑛 = 4,5,6 1. Use Matlab pre-programmed matrices (eye, ones, zeros) and matrix operations,
efficiently input 𝐴𝑛 .
2. Compute 𝐴𝑛 −1
and display the result with rational entries.
b) Propose a general form for 𝐴𝑛 −1
, expressed in terms on 𝑛. c) Check your theory for 𝑛 = 6.
PROBLEM 4: Consider the matrix A=[4,-2 ,1 ,5; 3, 8, 2, -1; 6, 8, 9, 2; 2, 3, -1, 0]. Compute the
following five determinants and comment what general properties of determinants your
computations at points b-e illustrate:
(a) det(A); (b) det(A T ) where
T stands for transposed; (c)det(A
2 ); (d) det(2 A); (e ) det (A
-1 ).
PROBLEM 5: The color of light can be represented in a vector [R; G; B] where R= Amount of
red; G= amount of green and B=amount of blue. The human eye and the brain transform the
incoming signal into the signal [I; L; S] where I – intensity, L –long-wave signal and S – short
wave signal and 𝐼 = 𝑅+𝐺+𝐵
3 ; 𝐿 = 𝑅 − 𝐺; 𝑆 = 𝐵 −
𝑅+𝐺
2
a) Find the standard matrix P of the transformation from input [R; G; B] to output [I; L; S];
b) Consider a pair of yellow sunglasses for water sports that cuts out all blue light and passes all
red and green light. Find the matrix A that represents the transformation incoming light
undergoes as it passes through the sunglasses;
c) Find the matrix for the composed transformation that the light undergoes as it first passes
through the sunglasses and then the eye;
d) Compute the change in the [I; L; S] output signal between the [I; L; S] output without and
with the yellow sunglasses if the initial [R; G; B] input is [20;35;40].