Professional Documents
Culture Documents
LAforAIML 2
LAforAIML 2
1. Let A, B ∈ Rn×n . Prove that ∥AB∥2 ⩽ ∥A∥2 ∥B∥2 . This property of 2-norm
is called as sub-multiplicativity property. Does this property hold true for
Frobenius norm?
2. Let A ∈ Rn×n be an invertible matrix. Define max mag(A) and min mag(A)
and cond(A). Show that
1
(a) max mag(A) =
min mag(A−1 )
max mag(A)
(b) cond(A) =
min mag(A)
3. In each of the following cases, consider the matrix A ∈ Rm×n as a linear
function from Rn to Rm . Plot the unit sphere in Rn . Plot the ellipsoid obtained
in Rm as image of the unit sphere in Rn . Compute the condition number of
A (using inbuilt command). Further, if m = n, check whether the matrix is
invertible. Compute the determinant of A as well. Is there any relationship
between determinant and condition number?
1
−√ 0
2
(a) A = 0
1
− √
2
−1 1
−2 1 2
(b) A =
0 2 0
1 0.9
(c) A =
0.9 0.8
1 0
(d) A =
0 −10
1 1
(e) A = , where ε = 10, 5, 1, 10−1 , 10−2 , 10−4 , 0.
1 ε
4. For a matrix A with the property that the columns of A are linearly indepen-
dent, give the geometrical interpretation of the least squares solution to the
problem Ax = b and justify the name normal equations. In case, the matrix
A does not have linearly independent columns, comment on the nature of the
least squares solution.
1/3
5. Consider the system of linear equations Ax = b where A ∈ Rn×n is an invertible
matrix and b ∈ Rn is a given vector. Discuss the advantages in the case when
A is orthogonal.
f (u, v) = θ1 + θ2 u + θ3 v + θ4 uv
where M is the memory or the lag of the model. This model can be used to
predict the next observation in the time series.
(a) Set up a least squares problem to estimate the parameters in the model.
(b) Clearly write down the matrices A and b in the least squares formulation.
(c) What is the special structure that one can observe in A?
2/3
(d) Is there any relation of rank of A with M ?
Fit a polynomial least squares classifier of degree 2 to the data set using the
polynomial
(a) Give the error rate of the classifier using the confusion matrix.
(b) Show the regions in the R2 plane where the classifier model fb(x) = 1 and
fb(x) = −1.
(c) Does the second degree polynomial g = x1 x2 classify the generated points
with zero error? Compare the parameters estimated polynomial model
from the data with those of g.
10. MNIST dataset: For each of the digit 0, 1, . . . , 9 randomly select 1000 images
to generate a training data set of size 10000 images. Similarly generate a test
data set of 1000 images as a test data set. Fit a linear least squares classifier to
classify the data set into 10 classes and test prediction accuracy of the model
using the 10 × 10 confusion matrix. Do not use any inbuit functions for fitting
the model.
3/3