import numpy as np
import numpy.linalg as lg

A_mat = np.matrix([
    [0, 1, 1, 1, 0],
    [1, 0, 0, 0, 1],
    [1, 0, 0, 1, 1],
    [1, 0, 1, 0, 1],
    [0, 1, 1, 1, 0]
])

eigen = lg.eig(A_mat) # return Arr[5] with 5 different linear independent eigen values

vec = eigen[1][:, 0] # the column (eigen vector) with the largest eigen value

value = eigen[0][0] # the largest eigen value

print(vec)

print(A_mat * vec)

print(value * vec)

[((4, 8, 10, 2), 'numpy.matrix', 'np.matrix', ({(4, 18, 10, 1): '[[0, 1, 1, 1, 0], [1, 0, 0, 0, 1], [1, 0, 0, 1, 1], [1, 0, 1, 0, 1], [0, 1,\n    1, 1, 0]]'}, {}), '([[0, 1, 1, 1, 0], [1, 0, 0, 0, 1], [1, 0, 0, 1, 1], [1, 0, 1, 0, \n    1], [0, 1, 1, 1, 0]])', True, 'import numpy as np\n'), ((12, 8, 12, 21), 'numpy.linalg.eig', 'lg.eig', ({(12, 15, 12, 20): 'A_mat'}, {}), '(A_mat)', True, 'import numpy.linalg as lg\n')]