TITLE: Inverse of the matrix
QUESTION [14 upvotes]: $$U(a,b)=\left(\begin{matrix}a&b&b&b\\b&a&b&b\\b&b&a&b\\b&b&b&a\end{matrix}\right)$$
Is there an easy way to find the inverse of $U(1,2)$ , a trick to solve this problem easy?(its part of an exam with answers)

REPLY [7 votes]: Note $\, U = a + b x + b x^2 + b x^3\, $ for a circulant  $x$ satisfying $\,0 = x^4 - 1 = (x\!-\!1)\ (x\!+\!1)(x^2\!+\!1)$. Thus it suffices to compute $U^{-1}\!\!\pmod{x^4\!-1}$ by CRT, working modulo the above listed factors.
${\rm mod}\ \color{#0a0}{(x\!+\!1)(x^2\!+\!1)}\!:\,\ U^{-1}\equiv \color{#c00}{\dfrac{1}{a\!-\!b}}\ $ by $\ x\equiv -1 $ or $\,x^2\equiv -1\,\Rightarrow\, U\equiv a\!-\!b\,$ 
${\rm mod}\ x\!-\!1\!:\, \ \dfrac{1}{a\!+\!3b}\equiv U^{-1}\equiv \color{#c00}{\dfrac{1}{a\!-\!b}} + c\:\color{#0a0}{(x\!+\!1)(x^2\!+\!1)}\equiv \dfrac{1}{a\!-\!b}+4c\ $ by $\ x\equiv 1$
hence $\ 4c \equiv \dfrac{1}{a\!+\!3b}-\dfrac{1}{a\!-\!b}\ $ therefore $\ c \equiv \dfrac{-b\ \ \ }{(a\!-\!b)(a\!+\!3b)}$
Thus $\ U^{-1} = \underbrace{\dfrac{1}{a\!-\!b} + \color{#0a0}{c}}_{\large  d\,} +\color{#0a0}{c\,(x\!+\!x^2\!+\!x^3)}\, =\, \bbox[6px,border:1px solid red]{U(d,\,c)}\,,\ $ $\, d =  \dfrac{a\!+\!2b}{(a\!-\!b)(a\!+\!3b)}$