Diagonalizing a matrix

edited March 2020 in Assignments

(10 pts)

On our Online Presentations page under Problems for March 25, you should find a problem that asks you to diagonalize a matrix. You can put your response with solution here. I'd like you to explain the general steps, but you can feel free to use any computational tool that you like to assist in those steps.

Comments

  • edited March 2020

    The matrix $A=
    \begin{bmatrix}
    5 & 4 & -10 \\
    3 & 4 & -8\\
    3 & 3 & -7
    \end{bmatrix}$
    was generated for me to diagonalize.
    The first step is computing $det(A-\lambda I)=0$. This results in the polynomial $$ (5-\lambda)[(4-\lambda)(-7-\lambda)+24]-4[-3\lambda+3]-10[3\lambda-3]=0$$
    Further simplification brings the polynomial to $$
    5\lambda^2+15\lambda-20-\lambda^3-3\lambda^2+4\lambda+12\lambda-12-30\lambda+30=0 $$
    and then $-\lambda^3+2\lambda^+\lambda-2=0$. Factoring a $(-\lambda^2)$ out the first two terms gives $
    -\lambda^2(\lambda-2)+\lambda-2=0$. Then factoring a $(\lambda-2)$ results in $$
    (\lambda-2)(1-\lambda^2)=0$$
    So the eigenvalues are $\lambda=-1,1,2$.
    Shifting the original matrix A by subtracting $\lambda I$ results in the three matrices
    $
    A_1=
    \begin{bmatrix}
    6 & 4 & -10 \\
    3 & 5 & -8\\
    3 & 3 & -6
    \end{bmatrix}
    A_2=
    \begin{bmatrix}
    4 & 4 & -10 \\
    3 & 3 & -8\\
    3 & 3 & -8
    \end{bmatrix}
    A_3=
    \begin{bmatrix}
    3 & 4 & -10 \\
    3 & 2 & -8\\
    3 & 3 & -9
    \end{bmatrix}
    $
    To speed things up I row reduced the matrices in python with sympy.rref().
    The output was

    [1, 0, -2]
    [0, 1, -1]
    [0, 0,  0]
    
    [1, 1, 0]
    [0, 0, 1]
    [0, 0, 0]
    
    [1, 0, -2]
    [0, 1, -1]
    [0, 0,  0]
    

    In the first and third matrices $x_3$ is free, so solving for $x_1$ and $x_2$ in terms of $x_3$ gives the eigenvectors
    $s_1=x_3
    \begin{bmatrix}
    1\\
    1\\
    1
    \end{bmatrix}
    $
    and
    $
    s_3=x_3
    \begin{bmatrix}
    2\\
    1\\
    1
    \end{bmatrix}
    $.

    In the middle matrix $x_2$ is free, and solving for $x_1$ and $x_3$ in terms of $x_2$ gives the middle eigenvector
    $s_2=x_2
    \begin{bmatrix}
    -1\\
    1\\
    0
    \end{bmatrix}
    $.
    Note the s eigenvectors correspond to each eigenvalue in ascending order.
    So now the eigenmatrix is
    $
    S=
    \begin{bmatrix}
    1 & -1 & 2 \\
    1 & 1 & 1\\
    1 & 0 & 1
    \end{bmatrix}
    $ and the diagonal matrix is
    $
    D=
    \begin{bmatrix}
    -1 & 0 & 0 \\
    0 & 1 & 0\\
    0 & 0 & 2
    \end{bmatrix}
    $
    I used python to invert $S$ with sympy.inv() and got
    $
    S^{-1}=
    \begin{bmatrix}
    -1 & -1 & 3 \\
    0 & 1 & -1 \\
    1 & 1 & -2
    \end{bmatrix}
    $
    Checking this with python verifies this is a diagonalization of $A$

    S= Matrix([
        [1, -1, 2],
        [1, 1, 1],
        [1, 0, 1],
    ])
    D = Matrix([
        [-1, 0, 0],
        [0, 1, 0],
        [0, 0, 2],
    ])
    SInv = S.inv()
    S*D*SInv
    output:
    [5, 4, -10]
    [3, 4, -8]
    [3, 3, -7]
    
    mark
  • The first thing I did for this question was import the necessary libraries:

    import numpy as np
    from scipy.linalg import eig, inv
    

    My matrix for this problem was

    A = np.matrix([
        [8,10,10],
        [0,3,0],
        [-5,-10,-7]
    ])
    

    The first part of this problem was to determine the eigenvalues and the eigenvectors for the matrix. I did this using the eig() command.

    eVals,eVecs = eig(A)    
    print(eVals)
    print(eVecs)
    #output:
    #[ 3.+0.j -2.+0.j  3.+0.j]
    #[[ 0.89442719 -0.70710678  0.29547676]
    #[ 0.          0.          0.5976143 ]
    #[-0.4472136   0.70710678 -0.74535269]]
    

    Notice that the values in eVecs form the $S$ matrix. Next I used the values in eVals to form the $D$ matrix by putting them along the main diagonal.

    D = np.zeros((3,3))
    for i in range(0,len(eVals)):
        D[i,i] = eVals[i].real
    

    The final step is to compute the $S^{-1}$ matrix. I did this usingSinv = inv(eVecs).
    Now I have all of the necessary matrices for the $S D S^{-1}$ decomposition.

    print(eVecs)
    print(D)
    print(Sinv)
    #output:
    #[[ 0.89442719 -0.70710678  0.29547676]
     #[ 0.          0.          0.5976143 ]
     #[-0.4472136   0.70710678 -0.74535269]]
    #[[ 3.  0.  0.]
     #[ 0. -2.  0.]
     #[ 0.  0.  3.]]
    #[[2.23606798 1.68328157 2.23606798]
     #[1.41421356 2.82842712 2.82842712]
     #[0.         1.67332005 0.        ]]
    

    My final step was to check my answer:

    eVecs.dot(D.dot(Sinv))
    #output:
    #array([[  8.,  10.,  10.],
           #[  0.,   3.,   0.],
           #[ -5., -10.,  -7.]])
    

    This is my original matrix, so I can see that the diagonalization was successful.

    mark
  • edited March 2020

    The given matrix was

    A=\begin{bmatrix}
    3 & -2 & -1 \\
    2 & -7 & -7\\
    -2 & 10 & 10
    \end{bmatrix}

    I first had to upload useful libraries

    import numpy as np
    from scipy.linalg import eig
    from scipy.linalg import inv
    

    The matrix was defined as

    M=np.matrix([
    [3,-2,-1],
    [2,-7,-7],
    [-2,10,10]
    ])
    

    In order to determine the eigen-vectors and eigen-values using

    EVa,EVe=eig(M)
    EVe
    EVe
    

    which produced

    array([[ 0.33333333,  0.57735027,  0.66666667],
       [ 0.66666667,  0.57735027, -0.33333333],
       [-0.66666667, -0.57735027,  0.66666667]])
    

    Which I then assigned to the variable S. I then was able to come up with the diagnol matrix from the eigen values which were determined to be 1,2,3. I set these values up in a matrix

    D=np.matrix([
    [1,0,0],
    [0,2,0],
    [0,0,3]
    ])
    

    I used the inverse functionality loaded in to create the matrix $S^{-1}$ and used the $SDS^{-1}$ to check these were the correct matrices.

    Sinv=inv(S)
    L=S*D*Sinv
    L
    
    matrix([[ 3., -2., -1.],
        [ 2., -7., -7.],
        [-2., 10., 10.]])
    
    markDonkey
  • edited April 2020

    I was given the matrix,
    $$A=\begin{pmatrix}
    19&30&-24\\
    0&1&0\\
    12&20&-15\end{pmatrix}.$$
    I imported the appropriate libraries,

    import numpy as np
    from scipy.linalg import eig, inv
    

    and entered my matrix.

    A = np.matrix([
        [19,30,-24],
        [0,1,0],
        [12,20,-15]
    ])
    

    In order to diagonalize the matrix, I had to put it in the form of $A=SDS^{-1}$, where $S$ is a matrix containing the eigenvectors of matrix $A$, and $D$ is a diagonal matrix containing the eigenvalues of $A$. The eigenvalues of $D$ correspond to the eigenvectors in $S$ so that $D_{i,i}$ is the eigenvalue for the eigenvector in column $i$ of martix $S$. To achieve this, I extracted the eigenpairs,

    vals, vecs = eig(A)
    

    which resulted in,
    $$S\approx\begin{pmatrix}
    0.832&0.8&-0.408\\
    0&0&0.707\\
    0.555&0.6&0.577\end{pmatrix},$$
    and eigenvalues $\lambda_{1}=3, \lambda_{2}=\lambda_{3}=1$. I used the eigenvalues to construct the $D$ matrix,

    D = np.matrix([
        [3,0,0],
        [0,1,0],
        [0,0,1]
    ])
    

    and computed $S^{-1}$,

    Sinv = inv(vecs)
    

    which resulted in,
    $$S\approx\begin{pmatrix}
    10.8&18&-14.4\\
    -10&-18&15\\
    0&1.41&0\end{pmatrix}.$$
    Checking my work, I was able to verify that $A=SDS^{-1}$,

    print('A =',vecs.dot(D.dot(Sinv)))
    
    Output: A = [[ 19.  30. -24.]
     [  0.   1.   0.]
     [ 12.  20. -15.]]
    
    
    mark
  • edited April 2020

    My personal matrix for this is $$ A = \begin{pmatrix}
    -3 & -2 & -4 \\
    4 & 3 & 13 \\
    0 & 0 & -2
    \end{pmatrix}.$$

    In order to find the eigenvalues, we must solve for $\lambda$ when det$(A-\lambda I)=0$. First, take the matrix $$ A-\lambda I = \begin{pmatrix}
    -3-\lambda & -2 & -4 \\
    4 & 3-\lambda & 13 \\
    0 & 0 & -2-\lambda
    \end{pmatrix}.$$

    Solving for the determinate of this matrix, we get $det(A-\lambda I)=(-3-\lambda)[(3-\lambda)(-2-\lambda)-0]+2[4(-2-\lambda)-0]-4[0-0]=0 \Rightarrow -\lambda^{3}-2\lambda^2+\lambda+2=0$. Solving for $\lambda$, we can see that this can also be written as $-\lambda^2(\lambda+2)+\lambda+2=0 \Rightarrow (\lambda+2)(-\lambda^2+1)=0$. From this, we find that our eigenvalues are $\lambda=-2,-1,1$.

    Next, we can find our eigenvectors using the formula $Av=\lambda v$ where $v$ is our eigenvector corresponding to each of our three eigenvalues. Using the command eig(A) in Python, we find that It verifies our eigenvalues we found, but also gives us our corresponding eigenvalues:

    Out:
    (array([-1.+0.j,  1.+0.j, -2.+0.j]),
     array([[-0.70710678,  0.4472136 , -0.81649658],
            [ 0.70710678, -0.89442719, -0.40824829],
            [ 0.        ,  0.        ,  0.40824829]]))
    

    Which ends up being our S matrix whose column vectors are equal to the eigenvectors of each respective eigenvalue. We can then find our D matrix by assembling a doagonal matrix of our eigenvalues. In other words,
    $$ S = \begin{pmatrix}
    -0.70710678 & 0.4472136 & -0.81649658 \\
    0.70710678 & -0.89442719 & -0.40824829 \\
    0 & 0 & 0.40824829
    \end{pmatrix},$$

    $$ D = \begin{pmatrix}
    -1 & 0 & 0 \\
    0 & 1 & 0\\
    0 & 0 & 2
    \end{pmatrix}.$$

    Next we must find the inverse of S. Using inv(S) in Python, we find that $$ S^{-1} = \begin{pmatrix}
    -2.82842716 & -1.4142136 & -7.07106792 \\
    -2.236068 & -2.236068 & -6.70820401 \\
    0 & 0 & 2.44948975
    \end{pmatrix}.$$

    Next, I can check my work by computing $A=SDS^{-1}$. Using S.dot(D.dot(inv(S))), we find

    Out:
    matrix([[-3.00000004, -2.00000004, -4.00000013],
            [ 4.00000004,  3.00000004, 13.00000013],
            [ 0.        ,  0.        , -2.        ]])
    

    which we can see is virtually identical to the A matrix we were given.

    mark
  • edited April 2020

    $$
    A = \left(
    \begin{array}{cccc}
    14 & 8 & 4 \\
    -32 & -18 & -8 \\
    16 & 8 & 2 \\
    \end{array}
    \right).
    $$

    The matrix above is the A matrix I was assigned for this problem.

    import numpy as np
    from scipy.linalg import lu, inv, solve, lu_solve, lu_factor, norm, eig, inv
    
    A = [
        [14, 8, 4],
        [-32, -18, -8],
        [16, 8, 2]
    
    ]
    eigenval, eigenvec = eig(A)
    

    First, the eigenvalues and the eigenvalues must be found for the given matrix. The eigenvalues are found by solving the system $ det(A - \lambda*I) = 0 $. Once the eigenvalues are found, the eigenvectors can be determined. The eig() function will be used to find both the eigenvalues and the eigenvectors, giving the following outputs:

    eigenvalues: 
    [ 2.+0.j -2.+0.j -2.+0.j]
    
     eigenvectors: 
    [[ 0.40824829  0.31799936  0.16210388]
     [-0.81649658 -0.8479983  -0.68117987]
     [ 0.40824829  0.42399915  0.7139442 ]]
    

    The eigenvector matrix is represented by S while the eigenvalues are placed along the diagonal in the D matrix. When diagonalizing a matrix, the S and D matrices hold the following relationship to the inital matrix A: $ A = SDS^{-1}$

    After these three matrices are found, they are then multiplied together to verify that they return A:

    S = eigenvec
    
    
    D = [
        [2, 0, 0],
        [0, -2, 0],
        [0, 0, -2]
    
    ]
    
    
    # S_inv is initially assigned to be an identity matrix due to some issues that occurred when
    # calculating A from S, D, and S_inv
    S_inv = [
        [1, 0, 0],
        [0, 1, 0],
        [0, 0, 1]
    ]
    
    S_inv = inv(S)
    
    
    
    A_diag = S.dot(D)
    A_diag_out = A_diag.dot(S_inv)
    
    
    print("eigenvalues: ")
    print(eigenval)
    print("\n eigenvectors: ")
    print(eigenvec)
    print("\n S: ")
    print(S)
    print("\n S_inv: ")
    print(S_inv)
    print("\n out: ")
    print(A_diag_out)
    

    This was the output, verifying that the matrix was correctly diagonalized:

     A: 
    [[ 14.   8.   4.]
     [-32. -18.  -8.]
     [ 16.   8.   2.]]
    
    mark
  • @Opie I think this looks good! You do have some redundancy, though, because the eig command computes the eigenvalues for you. There's no need to compute $\det(A-\lambda I)$.

  • dandan
    edited April 2020

    My given matrix was:

    $$A=
    \begin{bmatrix}
    5 & 0 & -6 \\
    46 & -17& -78\\
    -8 & 4 & 15
    \end{bmatrix}$$

    I'll make this part have pretty words, later. Anyone come up with any ways to reduce rounding error in your print out?

    import numpy as np
    from scipy.linalg import lu,solve, lu_solve, norm, inv, det, eigvalsh, eig, eigvals
    
    A = np.array([
     [5,0,-6],
     [46,-17,-78],
     [-8,4,15]
       ])
    
    eig(A)
    
    #out (array([ 3.+0.j,  1.+0.j, -1.+0.j]),
    array([[ 0.6882472 ,  0.80178373, -0.40824829],
        [ 0.6882472 , -0.26726124,  0.81649658],
        [ 0.22941573,  0.53452248, -0.40824829]]))
    
    S = np.array([
    [0.6882472,0.80178373,-0.40824829],
    [0.6882472,-0.26726124,0.81649658],
    [0.22941573,0.53452248,-0.40824829]
    ])
    
    T= inv(S)
    
    S.dot(T)
    
    array([[ 1.00000000e+00, -1.77635684e-15, -7.10542736e-15],
       [ 0.00000000e+00,  1.00000000e+00,  0.00000000e+00],
       [ 1.77635684e-15, -4.44089210e-16,  1.00000000e+00]])
    
    D = np.array([
    [3,0,0],
    [0,1,0],
    [0,0,-1]
    ])
    
    F=S.dot(D).dot(T)
    
    print(F)
    
    #out 
    
    [[ 5.00000049e+00 -2.12154640e-07 -6.00000091e+00]
    [ 4.60000052e+01 -1.70000023e+01 -7.80000098e+01]
    [-8.00000097e+00  4.00000042e+00  1.50000018e+01]]
    

    mark
  • edited April 2020

    My matrix was

    $$
    \begin{pmatrix}
    -28 & 4 & 18 \\
    -58 & 10 & 34 \\
    -31 & 4 & 21
    \end{pmatrix}
    $$

    First I imported the appropriate libraries and defined my matrix.

    import numpy as np
    from scipy.linalg import eig, inv
    
    A = np.array([
        [-28, 4, 18],
        [-58, 10, 34],
        [-31, 4, 21]
    ])
    

    I then determined the eigenvalues and eigenvectors.

    evals,evecs = eig(A)
    print(evals)
    print(evecs)
    
    #out
    [-2.+0.j  2.+0.j  3.+0.j]
    
    [[ 0.40824829 -0.30151134  0.48507125]
     [ 0.81649658 -0.90453403  0.48507125]
     [ 0.40824829 -0.30151134  0.72760688]]
    

    Having arrays containing the eigenvalues and eigenvectors, I defined the diagonal matrix, D, using the eigenvalue array and the non-singular matrix, S, as the eigenvector array. Finally, determining $S^{-1}$ completes the diagonalization,

    $$A = SDS^{-1}$$

    D = np.array([
        [evals[0], 0, 0],
        [0, evals[1], 0],
        [0, 0, evals[2]]
    ])
    S = evecs
    S_inv = inv(S)
    
    #out
    [[-2.+0.j  0.+0.j  0.+0.j]
     [ 0.+0.j  2.+0.j  0.+0.j]
     [ 0.+0.j  0.+0.j  3.+0.j]]
    
    [[ 0.40824829 -0.30151134  0.48507125]
     [ 0.81649658 -0.90453403  0.48507125]
     [ 0.40824829 -0.30151134  0.72760688]]
    
    [[ 1.71464282e+01 -2.44948974e+00 -9.79795897e+00]
     [ 1.32664992e+01 -3.31662479e+00 -6.63324958e+00]
     [-4.12310563e+00 -5.78374684e-14  4.12310563e+00]]
    

    In order to verify my result, I evaluated $SDS^{-1}$, which produced the original matrix, A.

    S.dot(D.dot(S_inv))
    
    # out
    array([[-28.+0.j,   4.+0.j,  18.+0.j],
           [-58.+0.j,  10.+0.j,  34.+0.j],
           [-31.+0.j,   4.+0.j,  21.+0.j]])
    
    mark
  • edited April 2020

    My matrix was given as
    $$
    A=
    \begin{bmatrix}
    1 & -4 & 2\\
    0 & 3 & -4 \\
    0 & 0 & -1
    \end{bmatrix}.
    $$
    To diagonalize this matrix we must find the matrices $S$ and $D$ such that
    $$
    A = SDS^{-1},
    $$
    but first we must find the eigenvalues and the eigenvectors of A. The eigenvalues $\lambda_i$ are the given as the roots of the characterist polynomial $det(A-\lambda I) = 0$ and the eigenvectors $\vec{v}_i $ are the solutions to $(A-\lambda_i I)\vec{v}_i = 0$.
    Using Python

    from numpy import array, diag
    from scipy.linalg import eig, norm, inv
    A = array([[1,-4,2],[0,3,-4],[0,0,-1]])
    L,v = eig(A)
    #output:
    [ 1.+0.j  3.+0.j -1.+0.j]
    [[ 1.         -0.89442719  0.57735027]
    [ 0.          0.4472136   0.57735027]
    [ 0.          0.          0.57735027]]
    

    I determined the eigenvalues and eigenvectors to be,
    $$
    \lambda =1 ,3 ,-1 ,
    $$
    and
    $$
    \vec{v} =
    \begin{bmatrix}
    1 \\
    0 \\
    0 \\
    \end{bmatrix},
    \begin{bmatrix}
    -2 \\
    1 \\
    0 \\
    \end{bmatrix},
    \begin{bmatrix}
    1 \\
    1 \\
    1 \\
    \end{bmatrix}.
    $$
    From here $D$ is a diagonal matrix whose trace is given by $d_{i,i}=\lambda_i$,
    and $S$ is the matrix whose columns are given by $\vec{v}_i$ such that $S = (\vec{v}_1,\vec{v}_2,\vec{v}_3)$.
    Therefore,
    $$
    D =
    \begin{bmatrix}
    1 & 0 & 0\\
    0 & 3 & 0 \\
    0 & 0 & -1 \\
    \end{bmatrix}
    \text{ and }
    S =
    \begin{bmatrix}
    1 & -2 & 1\\
    0 & 1 & 1\\
    0 & 0 & 1\\
    \end{bmatrix}.
    $$
    Using Python we can verify that $SDS^{-1}$ is indeed equal to A.

    D = diag(L)
    v.dot(D.dot(inv(v)))
    #output:
    [[ 1.+0.j, -4.+0.j,  2.+0.j]
    [ 0.+0.j,  3.+0.j, -4.+0.j]
    [ 0.+0.j,  0.+0.j, -1.+0.j]]
    
    mark
  • edited April 2020

    My given matrix was

    $$A = \begin{pmatrix}
    3 & 0 & 0 \\
    8 & -1 & 0 \\
    4 & 0 & -1 \
    \end{pmatrix}$$

    To diagonalize this matrix, we must matrices $D$ and $S$ such that

    $$ A = SDS^{-1}.$$

    These matrices can be constructed once the eigenvalues and eigenvectors of $A$ have been determined.

    Because $A$ is a lower triangular matrix, we can already determine that its eigenvalues will be the terms on the diagonal, 3 and -1. Just in case though, we can confirm this by computing $$det(A - \lambda I)$$ which comes out to $$(3 - \lambda)(-1 - \lambda)(-1 - \lambda).$$

    Next we must find the eigenvectors, which can be found by solving for each
    $$ \begin{pmatrix}
    3 & 0 & 0 \\
    8 & -1 & 0 \\
    4 & 0 & -1 \
    \end{pmatrix}
    \begin{pmatrix}
    x \\
    y \\
    z \
    \end{pmatrix} = \lambda
    \begin{pmatrix}
    x \\
    y \\
    z \
    \end{pmatrix}$$ for each $\lambda.$

    For the eigenvalue of 3, the solution is
    $$\begin{pmatrix}
    x \\
    y \\
    z \
    \end{pmatrix} =
    \begin{pmatrix}
    x \\
    2x \\
    x \
    \end{pmatrix}$$ with x being a free variable. Choosing $x = 1$ gives a possible eigenvector $$\vec{v} =
    \begin{pmatrix}
    1 \\
    2 \\
    1 \
    \end{pmatrix}.$$

    For the eigenvalue -1, the solution is
    $$\begin{pmatrix}
    x \\
    y \\
    z \
    \end{pmatrix} =
    \begin{pmatrix}
    0 \\
    y \\
    z \
    \end{pmatrix}$$ with y and z being free variables. Choosing $y = 1 , z = 1$ and $y = -1 , z = -1$ gives two possible eigenvectors $$\vec{v} =
    \begin{pmatrix}
    0 \\
    1 \\
    1 \
    \end{pmatrix},
    \begin{pmatrix}
    0 \\
    -1 \\
    -1 \
    \end{pmatrix}.$$

    Using these eigenvalues and eigenvectors we can construct $D$ and $S$, where $D$ is a diagonal matrix with the eigenvalues as the values on the diagonal and the columns of $S$ are formed by our corresponding eigenvectors. This gives a final result of

    $$D = \begin{pmatrix}
    -1 & 0 & 0 \\
    0 & -1 & 0 \\
    0 & 0 & 3 \
    \end{pmatrix} \text{ and } S =
    \begin{pmatrix}
    0 & 0 & 1 \\
    1 & -1 & 2 \\
    1 & -1 & 1 \
    \end{pmatrix}.$$

    mark
  • My Matrix is

    $$A = \begin{pmatrix}
    5 & -30& 14 \
    0 & -1 & 0 \
    -3 & 15 &-8 \
    \end{pmatrix}$$

    To start I imported my environments and initialized my matrix.

    import numpy as np
    from scipy.linalg import eig
    from scipy.linalg import inv
    
    M = np.matrix([
    [5,-30,14],
    [0,-1,0],
    [-3,15,-8]
    ])
    

    I then used the eig function to determine the eigenvalues and vectors

    EVa,EVe = eig(M)

    This told me that the diagonalized matrix must be

    D = np.matrix([
    [-1,0,0],
    [0,-2,0],
    [0,0,-1]
    ])
    

    To confirm this I set S equal to EVe and found its inverse

    S = EVe
    Sinv = inv(S)
    L = S*D*Sinv
    L
    matrix([[  5., -30.,  14.],
            [  0.,  -1.,   0.],
            [ -3.,  15.,  -8.]])
    
    mark
Sign In or Register to comment.