<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#L251-L266) |

Computes the lower-upper decomposition of a square matrix.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.ops.lu_factor(
        x
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A tensor of shape `(..., M, M)`. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tuple of two tensors: a tensor of shape `(..., M, M)` containing the lower and upper triangular matrices and a tensor of shape `(..., M)` containing the pivots. ||

<br />