# cross¶

ivy.cross(x1, x2, f=None)[source]

Returns the cross product of two (arrays of) vectors in R^3. The cross product of x1 and x2 in R^3 is a vector perpendicular to both x1 and x2. If x1 and x2 are arrays of vectors, the vectors are defined by the last axis of x1 and x2 by default which must have dimension 3.

Parameters
• x1 (array) – Components of the first vector(s).

• x2 (array) – Components of the second vector(s).

• f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

Vector cross product(s).

Supported Frameworks: