Let $A\in\mathbb{M}_n(K)$. What are the possible values of $$\text{rank}(A+\text{adj}(A))?$$
(Since this question was not in here and its answer needs some thinking, I'm adding it in a Q&A style)
Let $A\in\mathbb{M}_n(K)$. What are the possible values of $$\text{rank}(A+\text{adj}(A))?$$
(Since this question was not in here and its answer needs some thinking, I'm adding it in a Q&A style)
Copyright © 2021 JogjaFile Inc.
1) If $\text{rank}(A)\leq n-2$ then $\text{adj}(A)=0$, so trivially $\text{rank}(A+\text{adj}(A))=\text{rank}(A)$.
2) If $\text{rank}(A)=n-1$ then $\text{rank}(\text{adj}(A))=1$, so if $B:=A+\text{adj}(A)$ has rank $r$ then, as $A=B-\text{adj}(A)$ and $\text{rank}(A)\leq\text{rank}(B)+\text{rank}(\text{adj}(A))$ we get $$n-2\leq k\leq n.$$ All cases are possible:
Since $\text{adj}(A)=uv^T$, $A+\text{adj}(A)$ is a rank 1 perturbation of $A$ with $\det(A)=0$, so by the determinant lemma it is invertible iff $v^T\text{adj}(A)u\neq0$, which is equivalent to $(v^Tu)^2\neq0$, $v^Tu\neq0$, $\text{trace}(\text{adj}(A))\neq0$, $\sigma_{n-1}(A)\neq0$.
If $\text{trace}(\text{adj}(A))=0$, we can have either $\text{rank}(A+\text{adj}(A))=n-1$ or $n-2$.
If $A$ is diagonalizable, since in this case $\text{rank}(A)=n-1$ implies $\sigma_{n-1}(A)\neq0$, $\text{rank}(A+\text{adj}(A))=n$.
If $A$ is a Jordan block $$J_n(0)=\sum_{i=1}^{n-1} E_{(i,i+1)},$$ then $\text{adj}(A)=E_{1n}$ and $\text{rank}(A+\text{adj}(A))=n-1$.
If $A$ is upper triangular with diagonal $(1,\ldots,1,0,0)$ then by construction $\text{adj}(A)_{(n-1,n)}=-A_{(n-1,n)}$ and hence $\text{rank}(A+\text{adj}(A))=n-2$ (since it cannot be smaller).
3) If $\text{rank}(A)=n$ then $\text{rank}(\text{adj}(A))=n$, so $$0\leq k\leq n,$$ and all cases are possible:
Let $A=\text{diag}(d_i)$, $d_i\neq 0$. Then $\text{adj}(A)=\text{diag}(p_i)$, where $p_i:=\prod_{j\neq i} d_j$. We can have the last $n-k$ elements of $A+\text{adj}(A)$ be $0$ if $p_i=-d_i$ for $k+1\leq i\leq n$. If $k\leq n-1$ then $d_i/d_j=p_i/p_j=d_j/d_i$ and $$d_i^2=d_j^2$$ for $k+1\leq i,j\leq n$. In addition $d_{n-1}=-(d_1\cdots d_{n-2})d_n=(d_1\cdots d_{n-2})^2d_{n-1}$, so $$(d_1\cdots d_{n-2})^2=1.$$ Care must be taken with signs: if we pick $d_1\cdots d_{n-2}=-1$ then we can pick $d_i=d_j$ for $k+1\leq i,j\leq n$. On the other hand, since we want the first $k$ elements of $A+\text{adj}(A)$ not to be $0$, we need $p_i\neq -d_i$ for $1\leq i\leq k$. It suffices to put $d_i:=2$ for $1\leq i\leq k-1$, $d_k:=-2^{-k+1}$, $d_j:=1$ for $k+1\leq k\leq n$. Then $$A:=\text{diag}(\overbrace{2,\ldots,2}^{k-1},-2^{-k+1},1,\ldots,1)$$ satisfies $\text{rank}(A+\text{adj}(A))=k$.