square root of a certain matrix Hello,
I'd like to know the square root of the following $n$ by $n$ matrix, for $n > 2$ and $r>0$:
$R_{ii}=r+1$ for $i < n$
$R_{ij}=r$ otherwise
The $2$ by $2$ case is given by
$\sqrt{R}=\frac{1}{d} \left[\begin{array}{cc} 1+r+\sqrt{r} & r \\\ r & r+\sqrt{r}\end{array}\right]$
where $d=\sqrt{1+2r+2\sqrt{r}}$.
Any thoughts?
Many thanks.
 A: Let $P(a,b,c)$ be the $n\times n$ matrix where 
$$
 P(a,b,c)_{ij} = \begin{cases}
  a & \text{ if } i,j < n \\
  b & \text{ if } i < n \text{ and } j = n \\
  b & \text{ if } i = n \text{ and } j < n \\
  c & \text{ if } i = j = n.
 \end{cases}
$$
If I understand correctly, you want the square root of $I+P(r,r,0)$.  You can check that 
$$ (I+P(a,b,c))^2 = I + P((n-1)a^2+b^2+2a,(n-1)ab+bc+2b,(n-1)b^2+c^2+2c). $$
Thus, you just need to solve
\begin{align*}
 (n-1)a^2+b^2+2a &= r \\\\
 (n-1)ab+bc+2b &= r \\\\
 (n-1)b^2+c^2+2c &= 0.
\end{align*}
Maple tells me that if we put 
\begin{align*}
 p &= \sqrt{1+(n-1)(r-r^2)} \\\\
 q &= \sqrt{\frac{2p+2+(n-1)r}{(n-1)(n+3)}}
\end{align*}
then
\begin{align*}
 a &= q + \frac{q-r-pq}{(n-1)r} \\\\
 b &= q \\\\
 c &= \frac{q-r-pq}{r}.
\end{align*}
UPDATE:
The square root of $I+P(r,r,r-1)$ can be done similarly.  If we put 
\begin{align*}
 s &= (1 - 2\sqrt{r} + nr)^{-1/2} \\\\
 a &= rs + \frac{s - \sqrt{r}s - 1}{n-1} \\\\
 b &= rs \\\\
 c &= rs - \sqrt{r}s - 1
\end{align*}
then 
$$ \sqrt{I + P(r,r,r-1)} = 1 + P(a,b,c). $$
