Find the determinant of a matrix definition Let $A$ be a matrix that is defined like this:
$$A_{ij}=\begin{cases}
\alpha,  & \text{if i=j} \\
\beta , & \text{if i $\ne$ j}
\end{cases}
$$
So I realized this matrix looks somehow like this
$$
        \begin{pmatrix}
        \alpha & \beta & \beta \\
        \beta & \alpha & \beta \\
        \beta & \beta & \alpha \\
        \end{pmatrix}
$$
I tried to manipulate the rows to get an upper triangular matrix but couldn't succeed, am I in the right direction... some help?:)

We know that each determinant should consist of $n!$ products of $n$ entries each if we have an $n\times n$ matrix. Considering each $\alpha$ on the diagonal, such an $\alpha$ is multiplied by the determinant of the $(n-1)\times(n-1)$ version of the matrix. So if we take the previous determinant, multiply it by $n\cdot \alpha$, and divide each term by the exponent of $\alpha$ in the given term and add enough times $\beta^n$ to have a total of $n!$ products we should be good:
$$
\begin{align}
n&=2&&&det&=\alpha^2-\beta^2\\
n&=3&&&first&=3\alpha(\alpha^2-\beta^2)\\
&&&&&=3\alpha^3-3\alpha\beta^2\\
&&&&&\sim\alpha^3-3\alpha\beta^2\\
&&&&det&=\alpha^3-3\alpha\beta^2+2\beta^3\\
n&=4&&&first&=4\alpha(\alpha^3-3\alpha\beta^2+2\beta^3)\\
&&&&&=4\alpha^4-12\alpha^2\beta^2+8\alpha\beta^3\\
&&&&&\sim\alpha^4-6\alpha^2\beta^2+8\alpha\beta^3-6\beta^4+3\beta^4\\
&&&&det&=\alpha^4-6\alpha^2\beta^2+8\alpha\beta^3-3\beta^4\\
\end{align}
$$
Note here that in $n=4$ I have subtracted six $\beta^4$ and added three to have 12 negative and 12 positive terms as a total. Remember that we should have $4!=24$ products of $\alpha$'s and $\beta$'s and half of them should be positive, the other half negative. I do not know about a formula for the general $n$ yet, but it may be easy to derive from this ...

The reason for dividing by the exponent of $\alpha$ is that if we have $\alpha^k\beta^{n-k}$ each such product is counted repeated $k$ times when we move through the diagonal and consider which products each $\alpha$ participates in. If $k$ of the $\alpha$'s are in it, it will be counted when consulting each of these $k$ of the $\alpha$'s so $k$ times too often ...

One has to be careful when continuing this. We have to use the $24$-product version of $det(A_4)$ to have the correct number of products in $det(A_5)$:
$$
\begin{align}
first&=5\alpha(\alpha^4-6\alpha^2\beta^2+8\alpha\beta^3-6\beta^4+3\beta^4)\\
&=5\alpha^5-30\alpha^3\beta^2+40\alpha^2\beta^3-30\alpha\beta^4+15\alpha\beta^4\\
&\sim \alpha^5-10\alpha^3\beta^2+20\alpha^2\beta^3-30\alpha\beta^4+15\alpha\beta^4-20\beta^5+24\beta^5\\
det(A_5)&=\alpha^5-10\alpha^3\beta^2+20\alpha^2\beta^3-15\alpha\beta^4-4\beta^5
\end{align}
$$
This result is confirmed by Wolfram Alpha. Note also how the second to last line above has 60 positive and 60 negative contributions. A total of $5!=120$ as desired.
