CSE 203B W20 Homework 0
Due Time : 11:50pm, Fri Jan. 17, 2020 Submit to Gradescope
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)