# tf.linalg.eig

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.10.1/tensorflow/python/ops/linalg_ops.py#L378-L407) |

Computes the eigen decomposition of a batch of matrices.

#### View aliases


**Main aliases**

[`tf.eig`](https://www.tensorflow.org/api_docs/python/tf/linalg/eig)

<br />

    tf.linalg.eig(
        tensor, name=None
    )

The eigenvalues
and eigenvectors for a non-Hermitian matrix in general are complex. The
eigenvectors are not guaranteed to be linearly independent.

Computes the eigenvalues and right eigenvectors of the innermost
N-by-N matrices in `tensor` such that
`tensor[...,:,:] * v[..., :,i] = e[..., i] * v[...,:,i]`, for i=0...N-1.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tensor` | `Tensor` of shape `[..., N, N]`. Only the lower triangular part of each inner inner matrix is referenced. |
| `name` | string, optional name of the operation. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `e` | Eigenvalues. Shape is `[..., N]`. The eigenvalues are not necessarily ordered. |
| `v` | Eigenvectors. Shape is `[..., N, N]`. The columns of the inner most matrices contain eigenvectors of the corresponding matrices in `tensor` |

<br />