<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/numpy.py#L9548-L9564) |

Compute the sign and natural logarithm of the determinant of a matrix.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.ops.slogdet(
        x
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input matrix. It must 2D and square. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tuple `(sign, logabsdet)`. `sign` is a number representing the sign of the determinant. For a real matrix, this is 1, 0, or -1. For a complex matrix, this is a complex number with absolute value 1 (i.e., it is on the unit circle), or else 0. `logabsdet` is the natural log of the absolute value of the determinant. ||

<br />