# How to find eigenvalues of following matrix?

Let

$B=U_1U_1{^\prime}+U_2U_2{^\prime}-\frac{1}{(m+3)}(1_m+U_1+U_2)(1_m+U_1+U_2)^\prime$,

where $1_m$ is a column vector of all ones and $U_1$ and $U_2$ are column vectors of $0's$ and $1's$ such that $U_1=(1_{k_1}^\prime0_{m-k_1}^\prime)^\prime$ and $U_2=(1_{k_2}^\prime0_{m-k_2}^\prime)^\prime$. Note that $k_1 > k_2, 1 \le k_1,k_2 \le m-1$.

As $B$ has rank at most 3, it has at least $(m-3)$ eigenvalues equal to $0$, say $\lambda_4=\lambda_5=\cdots=\lambda_m=0$

I'm trying to find $k_1$ and $k_2$ such that $f(k_1,k_2)=(1+\lambda_1)(1+\lambda_2)(1+\lambda_3)$ is minimized. Any suggestions for finding $\lambda_1, \lambda_2$ and $\lambda_3$?

Is it possible to write eigenvector $x=U_1+U_2+\alpha(1_m+U_1+U_2)$ and then $Bx=\lambda x$ ?

We assume that $m\geq 3$. Numerical experiments seem to show that the minimum is obtained for $k_1=2,k_2=1$ and then $\lambda_1>\lambda_2>0>\lambda_3>-1$.
EDIT. When $k_1=2,k_2=1$, the characteristic polynomial of the matrix $B$ is
$p(x)=\dfrac{1}{m+3}x^{m-3}(a_3x^3+a_2x^2+a_1x+a_0)=$
$\dfrac{1}{m+3}x^{m-3}((m+3)x^3 +(-2m+2)x^2+(-2m+4)x+m-2)$.
Thus $f(2,1)=1+\sigma_1+\sigma_2+\sigma_3=\dfrac{a_3-a_2+a_1-a_0}{a_3}=\dfrac{7}{m+3}$.