Linear algebra

Vector Operations Calculator

Enter two vectors in 2D or 3D to get the dot product, cross product, magnitudes, the angle between them, projections and more, each with the formula and the numbers plugged in.

Vector A
Vector B
OperationFormulaResult
Working

    Runs entirely in your browser. Nothing is uploaded to any server.

    Why use this vector calculator

    All the basics

    Every common vector operation from one pair of inputs.

    Shows the working

    The formula and the substituted numbers for each result.

    2D and 3D

    Switch dimensions and see the vectors drawn.

    How to calculate vector operations

    1. Choose 2D or 3DPick the dimension of your vectors.
    2. Enter A and BType the components, and a scalar k if you need k·A.
    3. Read the resultsCheck the table and the step-by-step working.

    Dot product versus cross product

    The dot product A·B multiplies matching components and adds them. It is a single number equal to |A||B|cos θ, so it is zero for perpendicular vectors and is used to find angles and projections.

    The cross product A×B exists in 3D and gives a vector perpendicular to both A and B, with length |A||B|sin θ, which is the area of the parallelogram they span. In 2D the calculator gives the z-component a₁b₂ − a₂b₁, whose sign tells you whether B turns counter-clockwise or clockwise from A.

    Magnitude

    The length of a vector: the square root of the sum of squared components.

    Unit vector

    Same direction, length 1, found by dividing by the magnitude.

    Projection

    How much of A points along B.

    Vector operations FAQ

    How do I know if two vectors are perpendicular?

    Their dot product is zero. The calculator reports this in the Relationship box.

    Why is there no full cross product in 2D?

    The cross product needs a third direction. For 2D vectors the calculator gives the z-component, which is what you get by treating them as 3D vectors with z = 0.

    What is the angle between a vector and the zero vector?

    It is undefined, because the zero vector has no direction.

    Is A × B the same as B × A?

    No. B × A = −(A × B), so the result points the opposite way.

    How is the 3D plot drawn?

    It uses an isometric projection, so lengths look slightly different from their true values.

    Try other math tools

    More free tools from My Panda Toolbox.