If matrix $A \in \Bbb R^{d \times d}$ is positive semidefinite and tall matrix $W \in \Bbb R^{d \times c}$ (where $d > c$) has orthonormal columns, $W^T W = I_c$, does the following inequality hold?
$$\mbox{Tr} \left( W^T A W \right) \leq \mbox{Tr} (A)$$
It seems true after I run the code many times, but I can't prove it. Anyone can help? Thanks.
import numpy as np
d = 10
m = round(0.3*d)
A = np.random.randint(-100, 100, (d, d))
A = A.dot(A.T) #A is postive semidefinte now
B = np.random.randint(-100, 100, (d, m))
u, s, vh = np.linalg.svd(B)
W = u[:, 0:m]
p1 = np.trace(W.T.dot(A).dot(W))
p2 = np.trace(A)
print(p1)
print(p2)