Determinant of a \(n\times{n}\) matrix
- Grigorios Kostakos
- Founder
- Posts: 461
- Joined: Mon Nov 09, 2015 1:36 am
- Location: Ioannina, Greece
Determinant of a \(n\times{n}\) matrix
Calculate the determinant of the \(n\times{n}\) real matrix \[A=\left({\begin{array}{cccccc} x & a_1 & a_2 & \cdots & a_{n-2} & a_{n-1}\\ a_1 & x & a_2 & \cdots & a_{n-2} & a_{n-1}\\ a_1 & a_2 & x & \cdots & a_{n-2} & a_{n-1}\\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\ a_1 & a_2 & a_3 & \cdots & x & a_{n-1}\\ a_1 & a_2 & a_3 & \cdots & a_{n-1} & x \end{array}}\right)\,.\]
Grigorios Kostakos
-
- Former Team Member
- Posts: 77
- Joined: Mon Nov 09, 2015 11:52 am
- Location: Limassol/Pyla Cyprus
- Contact:
Re: Determinant of a \(n\times{n}\) matrix
We observe that if \(x = a_1\) then the first row of \(A\) is identical to the second row and so in this case the determinant is 0. This implies that \(x-a_1\) is a factor of the determinant. Similarly, \(x-a_2\) is also a factor since in the case that \(x=a_2\) the second row of \(A\) is identical to the third row and so on.
We deduce that \( \det(A) = C(x-a_1) \cdots (x-a_{n-1})(x-k) \) for some constants \(C,k\). Clearly, the coefficient of \(x^n\) is equal to 1, and so \(C=1\). Furthermore, the coefficient of \(x^{n-1}\) must be equal to \(0\). To see this just observe that we cannot choose \(n\) entries of \(A\) such that we have exactly one entry from each row, exactly one from each column and with exactly \(n-1\) of them to be equal to the \(x\)'s. This means that \(k = -(a_1+\cdots + a_{n-1})\) and so \[ \det(A) = (x-a_1) \cdots (x-a_{n-1})(x+a_1 + \cdots + a_{n-1}).\] Strictly speaking the above proof only works in the cases that the \(a_i\)'s are distinct as otherwise we need to be more careful with the multiplicities of the roots. However, given a matrix \(A\) in which some of the \(a_i\)'s are equal we can find a sequence \(A_m\) of matrices of the above form having distinct \(a_i\)'s and such as the entries of \(A_m\) tend to the entries of \(A\) as \(m \to \infty\). Since the result is true for the \(A_m\)'s and since the determinant is computed using just the operations of addition and multiplication of its elements we deduce that the result must be true for \(A\) as well.
We deduce that \( \det(A) = C(x-a_1) \cdots (x-a_{n-1})(x-k) \) for some constants \(C,k\). Clearly, the coefficient of \(x^n\) is equal to 1, and so \(C=1\). Furthermore, the coefficient of \(x^{n-1}\) must be equal to \(0\). To see this just observe that we cannot choose \(n\) entries of \(A\) such that we have exactly one entry from each row, exactly one from each column and with exactly \(n-1\) of them to be equal to the \(x\)'s. This means that \(k = -(a_1+\cdots + a_{n-1})\) and so \[ \det(A) = (x-a_1) \cdots (x-a_{n-1})(x+a_1 + \cdots + a_{n-1}).\] Strictly speaking the above proof only works in the cases that the \(a_i\)'s are distinct as otherwise we need to be more careful with the multiplicities of the roots. However, given a matrix \(A\) in which some of the \(a_i\)'s are equal we can find a sequence \(A_m\) of matrices of the above form having distinct \(a_i\)'s and such as the entries of \(A_m\) tend to the entries of \(A\) as \(m \to \infty\). Since the result is true for the \(A_m\)'s and since the determinant is computed using just the operations of addition and multiplication of its elements we deduce that the result must be true for \(A\) as well.
- Grigorios Kostakos
- Founder
- Posts: 461
- Joined: Mon Nov 09, 2015 1:36 am
- Location: Ioannina, Greece
Re: Determinant of a \(n\times{n}\) matrix
Thank you Demetres.
A second solution is \begin{align*}
|{A}|&=\left|{\begin{array}{cccccc}
x & a_1 & a_2 & \cdots & a_{n-2} & a_{n-1}\\
a_1 & x & a_2 & \cdots & a_{n-2} & a_{n-1}\\
a_1 & a_2 & x & \cdots & a_{n-2} & a_{n-1}\\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
a_1 & a_2 & a_3 & \cdots & x & a_{n-1}\\
a_1 & a_2 & a_3 & \cdots & a_{n-1} & x
\end{array}}\right|{\begin{array}{l}
{{\rm{r}}_1\rightarrow{\rm{r}}_1-{\rm{r}}_{2}}\\
{{\rm{r}}_2\rightarrow{\rm{r}}_2-{\rm{r}}_{3}}\\
{{\rm{r}}_3\rightarrow{\rm{r}}_3-{\rm{r}}_{4}}\\
{\;\vdots\hspace{1.2cm}\vdots}\\
{{\rm{r}}_{n-1}\rightarrow{\rm{r}}_{n-1}-{\rm{r}}_{n}}\\
{}\end{array}}\\
& =\left|{\begin{array}{cccccc}
x-a_1 & a_1-x & 0 & \cdots & 0 & 0\\
0 & x-a_2 & a_2-x & \cdots & 0 & 0\\
0 & 0 & x-a_3 & \cdots & 0 & 0\\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 & \cdots & x-a_{n-1} & a_{n-1}-x\\
a_1 & a_2 & a_3 & \cdots & a_{n-1} & x
\end{array}}\right|\\
& =(x-a_1)\,(x-a_2)(x-a_3)\cdots(x-a_{n-1})\left|{\begin{array}{rrrccr}
1 & -1 & 0 & \cdots & 0 & 0\\
0 & 1 & -1 & \cdots & 0 & 0\\
0 & 0 & 1 & \cdots & 0 & 0\\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 & \cdots & 1 & -1\\
a_1 & a_2 & a_3 & \cdots & a_{n-1} & x
\end{array}}\right|\\
& =\displaystyle\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{n+1}\,a_1\left|{\begin{array}{rrrcrr}
-1 & 0 & 0 & \cdots & 0 & 0\\
1 & -1 & 0 &\cdots & 0 & 0\\
0 & 1 & -1 &\cdots & 0 & 0\\
\vdots & \vdots &\vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 &\cdots & -1 & 0\\
0 & 0 & 0 &\cdots & 1 & -1
\end{array}}\right|\,+\\
&\quad\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{n+2}\,a_2\left|{\begin{array}{rrrcrr}
1 & 0 & 0 & \cdots & 0 & 0\\
0 & -1 & 0 &\cdots & 0 & 0\\
0 & 1 & -1 &\cdots & 0 & 0\\
\vdots & \vdots &\vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 &\cdots & -1 & 0\\
0 & 0 & 0 &\cdots & 1 & -1
\end{array}}\right|+\ldots\,+\\
&\quad\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{2n-1}\,a_{n-1}\left|{\begin{array}{rrrccr}
1 & -1 & 0 & \cdots & 0 & 0\\
0 & 1 & -1 &\cdots & 0 & 0\\
0 & 0 & 1 &\cdots & 0 & 0\\
\vdots & \vdots &\vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 &\cdots & 1 & 0\\
0 & 0 & 0 &\cdots & 0 & -1
\end{array}}\right|\,+\\
&\quad\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{2n}\,x\left|{\begin{array}{rrrccr}
1 & -1 & 0 & \cdots & 0 & 0\\
0 & 1 & -1 &\cdots & 0 & 0\\
0 & 0 & 1 &\cdots & 0 & 0\\
\vdots & \vdots &\vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 &\cdots & 1 & -1\\
0 & 0 & 0 &\cdots & 0 & 1
\end{array}}\right|\\
&=\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{n+1}\,a_1\,(-1)^{n-1}+\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{n+2}\,a_2\,(-1)^{n-2}+\ldots\,+\\
&\quad\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{2n-1}\,a_{n-1}\,(-1)+\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{2n}\,x\\
&=\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,\bigl({a_1\,(-1)^{2n}+(-1)^{2n}\,a_2+\ldots+(-1)^{2n}\,a_{n-1}+(-1)^{2n}\,x}\bigr)\\
&=\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,\bigl({a_1+a_2+\ldots+a_{n-1}+x}\bigr)\\
&=\displaystyle\biggl({\mathop{\sum}\limits_{j=1}^{n-1}{a_j}+x}\biggr)\,\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,.\qquad\square
\end{align*}
A second solution is \begin{align*}
|{A}|&=\left|{\begin{array}{cccccc}
x & a_1 & a_2 & \cdots & a_{n-2} & a_{n-1}\\
a_1 & x & a_2 & \cdots & a_{n-2} & a_{n-1}\\
a_1 & a_2 & x & \cdots & a_{n-2} & a_{n-1}\\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
a_1 & a_2 & a_3 & \cdots & x & a_{n-1}\\
a_1 & a_2 & a_3 & \cdots & a_{n-1} & x
\end{array}}\right|{\begin{array}{l}
{{\rm{r}}_1\rightarrow{\rm{r}}_1-{\rm{r}}_{2}}\\
{{\rm{r}}_2\rightarrow{\rm{r}}_2-{\rm{r}}_{3}}\\
{{\rm{r}}_3\rightarrow{\rm{r}}_3-{\rm{r}}_{4}}\\
{\;\vdots\hspace{1.2cm}\vdots}\\
{{\rm{r}}_{n-1}\rightarrow{\rm{r}}_{n-1}-{\rm{r}}_{n}}\\
{}\end{array}}\\
& =\left|{\begin{array}{cccccc}
x-a_1 & a_1-x & 0 & \cdots & 0 & 0\\
0 & x-a_2 & a_2-x & \cdots & 0 & 0\\
0 & 0 & x-a_3 & \cdots & 0 & 0\\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 & \cdots & x-a_{n-1} & a_{n-1}-x\\
a_1 & a_2 & a_3 & \cdots & a_{n-1} & x
\end{array}}\right|\\
& =(x-a_1)\,(x-a_2)(x-a_3)\cdots(x-a_{n-1})\left|{\begin{array}{rrrccr}
1 & -1 & 0 & \cdots & 0 & 0\\
0 & 1 & -1 & \cdots & 0 & 0\\
0 & 0 & 1 & \cdots & 0 & 0\\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 & \cdots & 1 & -1\\
a_1 & a_2 & a_3 & \cdots & a_{n-1} & x
\end{array}}\right|\\
& =\displaystyle\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{n+1}\,a_1\left|{\begin{array}{rrrcrr}
-1 & 0 & 0 & \cdots & 0 & 0\\
1 & -1 & 0 &\cdots & 0 & 0\\
0 & 1 & -1 &\cdots & 0 & 0\\
\vdots & \vdots &\vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 &\cdots & -1 & 0\\
0 & 0 & 0 &\cdots & 1 & -1
\end{array}}\right|\,+\\
&\quad\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{n+2}\,a_2\left|{\begin{array}{rrrcrr}
1 & 0 & 0 & \cdots & 0 & 0\\
0 & -1 & 0 &\cdots & 0 & 0\\
0 & 1 & -1 &\cdots & 0 & 0\\
\vdots & \vdots &\vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 &\cdots & -1 & 0\\
0 & 0 & 0 &\cdots & 1 & -1
\end{array}}\right|+\ldots\,+\\
&\quad\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{2n-1}\,a_{n-1}\left|{\begin{array}{rrrccr}
1 & -1 & 0 & \cdots & 0 & 0\\
0 & 1 & -1 &\cdots & 0 & 0\\
0 & 0 & 1 &\cdots & 0 & 0\\
\vdots & \vdots &\vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 &\cdots & 1 & 0\\
0 & 0 & 0 &\cdots & 0 & -1
\end{array}}\right|\,+\\
&\quad\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{2n}\,x\left|{\begin{array}{rrrccr}
1 & -1 & 0 & \cdots & 0 & 0\\
0 & 1 & -1 &\cdots & 0 & 0\\
0 & 0 & 1 &\cdots & 0 & 0\\
\vdots & \vdots &\vdots & \ddots & \vdots & \vdots\\
0 & 0 & 0 &\cdots & 1 & -1\\
0 & 0 & 0 &\cdots & 0 & 1
\end{array}}\right|\\
&=\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{n+1}\,a_1\,(-1)^{n-1}+\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{n+2}\,a_2\,(-1)^{n-2}+\ldots\,+\\
&\quad\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{2n-1}\,a_{n-1}\,(-1)+\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,(-1)^{2n}\,x\\
&=\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,\bigl({a_1\,(-1)^{2n}+(-1)^{2n}\,a_2+\ldots+(-1)^{2n}\,a_{n-1}+(-1)^{2n}\,x}\bigr)\\
&=\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,\bigl({a_1+a_2+\ldots+a_{n-1}+x}\bigr)\\
&=\displaystyle\biggl({\mathop{\sum}\limits_{j=1}^{n-1}{a_j}+x}\biggr)\,\mathop{\prod}\limits_{i=1}^{n-1}(x-a_i)\,.\qquad\square
\end{align*}
Grigorios Kostakos
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 0 guests