辅导案例-CSE 203B
CSE 203B W20 Homework 0
Due Time : 11:50pm, Fri Jan. 17, 2020 Submit to Gradescope
Gradescope: https://gradescope.com/
In this homework, we work on the basics of linear algebra.
Total points: 25. All the problems are graded by content.
1. Matrix Properties (11 pts)
1.1. Linear System (2pts)
Consider the following system of equations
2x1 + 4x2 + 6x3 = 1
x1 − x2 + 2x3 = −1
3x1 + 5x3 = 2
Can you write the equations in a matrix form?
1.2. For the matrix in 1.1, calculate its range. What’s the rank of this matrix? (2pts)
1.3. Calculate the nullspace of the matrix in 1.1. What’s the relation between the range and
nullspace of a matrix? (2pts)
1.4. Calculate the trace and determinant of the matrix in 1.1. Find the eigenvalues and eigen-
vectors. (2pts)
1.5. Prove the following properties. (3 pts)
• For A ∈ Rm×n, B ∈ Rn×m, trAB = trBA.
• For A,B ∈ Rn×n, detAB = detA detB.
• For A ∈ Rn×n, detA = ∏ni=1 λi where λi, i = 1, . . . , n are the eigenvalues of A.
2. Matrix Operations (14 pts)
Gradient: consider a function f : Rn → R that takes a vector x ∈ Rn and returns a real value.
1
Then the gradient of f (w.r.t. x) is the vector of partial derivatives, defined as
∇xf(x) =

∂f(x)
∂x1
∂f(x)
∂x2
...
∂f(x)
∂xn
 .
Hessian: consider a function f : Rn → R that takes a vector x ∈ Rn and returns a real value.
Then the Hessian matrix of f (w.r.t. x) is the n× n matrix of partial derivatives, defined as
∇2xf(x) =

∂2f(x)
∂x21
∂2f(x)
∂x1∂x2
. . . ∂
2f(x)
∂x1∂xn
∂2f(x)
∂x1∂x2
∂2f(x)
∂x22
. . . ∂
2f(x)
∂x2∂xn
...
...
. . .
...
∂2f(x)
∂xn∂x1
∂2f(x)
∂xn∂x2
. . . ∂
2f(x)
∂x2n
 .
2.1. Derive the gradient and Hessian matrix for the linear function
f(x) = bTx
where x ∈ Rn and vector b ∈ Rn. (2 pts)
2.2. Derive the gradient and Hessian matrix of the quadratic function
f(x) = xTAx+ bTx+ c
where x ∈ Rn, matrix A ∈ Sn is symmetric, and vectors b, c ∈ Rn. (4 pts)
2.3. Derive the gradient of the function f : Sn → R
f(X) = log det X, domf = SN++. (4 pts)
2.4. Given matrix A ∈ Rm×n, assume m > n and rank(A) = n. Given vector b ∈ Rm such that
b /∈ R(A). Find vector x ∈ Rn such that Ax is as close as possible to b, measured by the square of
the Euclidean norm ||Ax− b||22. (4 pts)
2
51作业君 51作业君

扫码添加客服微信

添加客服微信: IT_51zuoyejun