<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#L6704-L6723) |

Compute the outer product of two vectors.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.ops.outer(
        x1, x2
    )

Given two vectors `x1` and `x2`, the outer product is:

    out[i, j] = x1[i] * x2[j]

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x1` | First input tensor. |
| `x2` | Second input tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Outer product of `x1` and `x2`. ||

<br />