# tf.math.add

<br />

|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/math/add) |

Returns x + y element-wise.

#### View aliases


**Main aliases**

[`tf.add`](https://www.tensorflow.org/api_docs/python/tf/math/add)
**Compat aliases for migration**

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

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

<br />

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

> [!NOTE]
> **Note:** [`math.add`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/math/add) supports broadcasting. `AddN` does not. 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`, `uint8`, `int8`, `int16`, `int32`, `int64`, `complex64`, `complex128`, `string`. |
| `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 />