# Determinant of a N symmetric square matrix with diagonal 1

What is the determinant of a symmetric $n \times n$ matrix with all diagonals be 1 and all others are $\rho$ (yes correlation matrix)?

Anyone can tell me a method to work it out elegantly?

Thanks!

-

## 2 Answers

Let $A$ be an $n\times n$ matrix of your desired form. Let us form the matrix of all ones, call it $J$. Then we can represent $A$ as $$A=\rho J - (\rho - 1)I$$ The determinant of the above matrix is $$\det(A) = \rho^n\det\left(J - \frac{\rho - 1}{\rho}I\right)$$ Letting $\lambda = \frac{\rho - 1}{\rho}$, the latter determinant is precisely the characteristic polynomial of $J$, easily seen as $$p(\lambda)=(-1)^{n}\lambda^{n-1}(\lambda - n)$$ Some simplifying then gives the determinant as $$\det(A)=\left(1-\rho \right)^{n-1}\left(1 + \rho n-\rho\right)$$

-

Let $M_n$ be the matrix with matrix elements $$M_{ij}= \cases{1 & $i=j$\cr \rho & $i\not=j$}$$ Also let $N_n$ be the $n \times n$ matrix, obtained by $M_n$ by replacing first element of the first row with $\rho$.

Applying Laplace's method to the first row of $M_n$ and $N_n$: $$\begin{eqnarray} \det M_n &=& \det M_{n-1} - (n-1) \rho \cdot \det N_{n-1} \\ \det N_n &=& \rho \cdot \det M_{n-1} - (n-1) \rho \cdot \det N_{n-1} \end{eqnarray}$$ with $\det M_2 = 1 - \rho^2$ and $\det N_2 = \rho(1-\rho)$. This gives $$\det(M_n) = (1-\rho)^{n-1}(1+(n-1) \rho)\qquad \det N_n = \rho (1-\rho)^{n-1}$$

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 17, "mathjax_display_tex": 7, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9226181507110596, "perplexity_flag": "head"}