What’s the meaning of ‘trace(Z) is valid only if the elements along the diagonal have the same curvature’ in The CVX Users’ Guide?

# 'trace(Z) is valid only if the elements along the diagonal have the same curvature'

**mcg**(Michael C. Grant) #2

It means that you can’t take the trace of a matrix whose diagonal has a mixture of convex and concave elements. It’s basically a straightforward application of the fact that `trace(Z) = sum(diag(Z))`

.