<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/ops/linalg.py#L24-L38) |

Computes the Cholesky decomposition of a positive semi-definite matrix.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.ops.cholesky(
        x, upper=False
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor of shape `(..., M, M)`. |
| `upper` | `bool` <br /> If True, returns the upper-triangular Cholesky factor. If False (default), returns the lower-triangular Cholesky factor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor of shape `(..., M, M)` representing the Cholesky factor of `x`. ||

<br />