# tf.math.squared_difference

<br />

Returns conj(x - y)(x - y) element-wise.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.math.squared_difference`](https://www.tensorflow.org/api_docs/python/tf/math/squared_difference), [`tf.compat.v1.squared_difference`](https://www.tensorflow.org/api_docs/python/tf/math/squared_difference)

<br />

    tf.math.squared_difference(
        x, y, name=None
    )

> [!NOTE]
> **Note:** [`math.squared_difference`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/math/squared_difference) supports broadcasting. More about broadcasting [here](http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html)

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A `Tensor`. Must be one of the following types: `bfloat16`, `half`, `float32`, `float64`, `int32`, `int64`, `complex64`, `complex128`. |
| `y` | A `Tensor`. Must have the same type as `x`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor`. Has the same type as `x`. ||

<br />