For matrix

\[\mathbf{A} = \left[\begin{array} {rrr} 2 & 1 & 1 \\ 1 & 2 & 1 \\ 1 & 1 & 2 \end{array}\right] \] , the charasteristic polynomial of A is (4-x)(1-x)2. Find the eigen values and eigenvectors.

Sol: The characteristic polynomial is (4-x)(1-x)2 = 0

The eigen values will be x = 1, 4

for x= 1

\[\mathbf{A} = \left[\begin{array} {rrr} 2-x & 1 & 1 \\ 1 & 2-x & 1 \\ 1 & 1 & 2-x \end{array}\right]\]

substitute x = 1

\[\left[\begin{array} {cc} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{array}\right]\]

reduce the matrix using row and column operations

R2 -> R2-R1 and R3 -> R3-R1

\[\left(\begin{array} {cc} 1 & 1 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{array}\right)\]

solve the matrix equation

\[\left(\begin{array} {cc} 1 & 1 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{array}\right) \left(\begin{array} {cc} x \\ y \\ z \end{array}\right) =\left(\begin{array} {cc} 0 \\ 0 \\ 0 \end{array}\right)\]

this equation reduces to x + y + z = 0

x= -y - z

substitute back in matrix

\[\left(\begin{array} {cc} -y-z \\ y \\ z \end{array}\right)\]

which can be written as

\[\left(\begin{array} {cc} -y \\ y \\ 0 \end{array}\right) + \left(\begin{array} {cc} -z \\ 0 \\ z \end{array}\right)\]

suppose y =1 and z = 1

eigen vectors for x = 1 will be

\[\left(\begin{array} {cc} -1 \\ 1 \\ 0 \end{array}\right) , \left(\begin{array} {cc} -1 \\ 0 \\ 1 \end{array}\right)\]

for x= 4

\[\left(\begin{array} {cc} 2-4 & 1 & 1 \\ 1 & 2-4 & 1 \\ 1 & 1 & 2-4 \end{array}\right)\]

the matrix reduces to \[\left(\begin{array} {cc} -2 & 1 & 1 \\ 1 & -2 & 1 \\ 1 & 1 & -2 \end{array}\right)\]

reduce the matrix using row and column operations

R2 -> R2+1/2R1 and R3 -> R3+ 1/2R1

\[\left(\begin{array} {cc} -2 & 1 & 1 \\ 0 & -3/2 & 3/2 \\ 0 & 3/2 & -3/2 \end{array}\right)\]

R3 -> R3+ R2

\[\left(\begin{array} {cc} -2 & 1 & 1 \\ 0 & -3/2 & 3/2 \\ 0 & 0 & 0 \end{array}\right)\]

R2 -> -2/3R2

\[\left(\begin{array} {cc} -2 & 1 & 1 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{array}\right)\]

R1 -> R1-R2

\[\left(\begin{array} {cc} -2 & 0 & 2 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{array}\right)\]

R1 -> R1/2

\[\left(\begin{array} {cc} -1 & 0 & 1 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{array}\right)\]

solve the matrix equation

\[\left(\begin{array} {cc} -1 & 0 & 1 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{array}\right) \left(\begin{array} {cc} x \\ y \\ z \end{array}\right) =\left(\begin{array} {cc} 0 \\ 0 \\ 0 \end{array}\right)\]

the equation reduces to x = z and y =z

substitute into matrix \[\left(\begin{array} {cc} z \\ z \\ z \end{array}\right)\]

assume z=1

the eigenvectors corresponding to x= 4 are

\[\left(\begin{array} {cc} 1 \\ 1 \\ 1 \end{array}\right)\]

eigen values for matrix A are x = 1 and x = 4.

eigen vectors for matrix A are

\[\left(\begin{array} {cc} -1 \\ 1 \\ 0 \end{array}\right) , \left(\begin{array} {cc} -1 \\ 0 \\ 1 \end{array}\right) , \left(\begin{array} {cc} 1 \\ 1 \\ 1 \end{array}\right)\]

The eigenvectors are usually normalized, the inbuilt R function eigen() also creates unit eigenvecctors. To normalize the eigenvectors created manually, we can create a function, that will convert eigenvectors calculated manually to normalized vectors.

ev_normalize <- function(x) {x / sqrt(sum(x^2))}

eigenvectors corresponding to eigen value 1 were (-1,1,0) and (-1,0,1). For x = 4 (1,1,1)

Normalize the vectors

v1 <- c(-1,1,0)
v2 <- c(-1,0,1)
v3 <- c(1,1,1)

ev1<- ev_normalize(v1)
ev2<- ev_normalize(v2)
ev3<- ev_normalize(v3)



vectors_normalized <- matrix(c(ev1,ev2,ev3),3)
vectors_normalized
##            [,1]       [,2]      [,3]
## [1,] -0.7071068 -0.7071068 0.5773503
## [2,]  0.7071068  0.0000000 0.5773503
## [3,]  0.0000000  0.7071068 0.5773503