Why the eigenvalues are wrong?

 Why the eigenvalues are wrong?

Good day,

Please help me.

I compute eigenvalues using function Eigenvalues;

Given the matrix

mato={{1/3, 0, 0, 0}, {0, 1/3, 1/3, 0}, {0, 1/3, 1/3, 0}, {0, 0, 0, 0}}

I used:

Eigenvalues[mato]={2/3, 1/3, 0, 0}

but it wrong.

I should get eigenvalues = 0 and 2/3

How can I change this function below since I used only Eigenvalues in coding to calculate the eigenvalues.

setone=Eigenvalues[mato]
settwo=-Total[If[# > 0, (# Log2[#]), 0] & /@ setone] // N;

Please help me.

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange