The sum of the smallest \(k\) eigenvalues of a matrix.

lambda_sum_smallest(A, k)

Arguments

A

An Expression or matrix.

k

The number of eigenvalues to sum over.

Value

An Expression representing the sum of the smallest k eigenvalues of the input.

Examples

C <- Variable(3,3)
val <- cbind(c(1,2,3), c(2,4,5), c(3,5,6))
prob <- Problem(Maximize(lambda_sum_smallest(C,2)), list(C == val))
result <- solve(prob)
result$value
#> [1] -0.3448257
result$getValue(C)
#>      [,1] [,2] [,3]
#> [1,]    1    2    3
#> [2,]    2    4    5
#> [3,]    3    5    6