48. Graph Laplacian#

import numpy as np
l = np.array(
    [
        [1, -1/2**(0.5), 1/2**(0.5)],
        [-1/2**(0.5), 1, 0],
        [-1/2**(0.5), 0, 1]
    ]
)
np.linalg.eig(
    l
)
(array([1., 1., 1.]),
 array([[ 3.49637063e-09, -3.49637031e-09, -3.26641299e-16],
        [-7.07106781e-01, -7.07106781e-01,  7.07106781e-01],
        [-7.07106781e-01, -7.07106781e-01,  7.07106781e-01]]))
Created in deepnote.com Created in Deepnote