Skip to main content
CalcMax

Vector Calculator

Result

5.0000

Magnitude of the vector

x component of the unit vector
0.6000
y component of the unit vector
0.8000
z component of the unit vector
0.0000
x component of the vector
3.0000
y component of the vector
4.0000
z component of the vector
0.0000

A vector calculator reads one vector and reports three things about it at once: how long it is, which direction it points, and what its components are. Type two or three numbers — 3 4, or 2 3 6 — and the panel fills in. The magnitude of a vector is the square root of the sum of the squares of its components, and it is the single number that says how big the vector is. The direction of a vector is given as a unit vector: the same direction with the length divided out, so its own length is 1 and its component values carry the information. The vector components are printed exactly as typed, converted into numbers, and they sit beside the unit vector on purpose — reading 3 and 4 in one group and 0.6 and 0.8 in the next makes the division visible, and that side-by-side comparison is the reason this page exists as a summary rather than as three separate questions. A reader who wants only the length of a vector or only its direction will find a shorter page that answers just that. The zero vector is refused here: it has no direction, so one of the three readings would not exist.

One vector, three readings

Vectorx componenty componentz componentMagnitude of the vectorx component of the unit vectory component of the unit vectorz component of the unit vector
3 434050.60.80
0 0 50055001
1 11101.41420.70710.70710
-3 4-3405-0.60.80
2 3 623670.28570.42860.8571
1 1 11111.73210.57740.57740.5774
3 4 -534-57.07110.42430.5657-0.7071
0 2 00202010

Eight vectors and the three readings this page gives for each, in the order the panel prints them: the components, then the magnitude, then the direction. The second, third and fourth columns hold the input read back as numbers, and they exist because seeing them next to the unit vector is what turns the division from a result into a visible step — every figure in the last three columns is the figure directly above it in the same row divided by the magnitude in column five. The first row is the input the page loads with, and it is exact on both sides because 3-4-5 is a right triangle. The second row has a vector with only one non-zero component, and it is the clearest case for the component columns: 0 0 5 as typed could be mistaken for a single number, and the columns show it is a three-dimensional vector. The third row is the equal-component case in the plane, giving two equal unit vector components of 0.7071. The fourth row is the first row with one sign changed, and it shows which readings the sign reaches: the components and the unit vector both carry it, the magnitude does not. The fifth row is three-dimensional with a whole-number magnitude and no exact unit vector component. The sixth is the cube diagonal, whose three unit vector components are equal. The seventh is three-dimensional with a negative component, and it is the only row whose unit vector has a negative entry. The eighth lies along an axis, so its unit vector is the axis direction itself. There is no row for the zero vector, deliberately: it has no direction and the page refuses it. Every figure is recomputed when the page is built; the spaces in the first column are separators and not part of the numbers.

Formula

u = (u₁, u₂, u₃) |u| = √(u₁² + u₂² + u₃²) û = u ÷ |u|

Vector u
The one input: two or three numbers separated by spaces or commas. Two entries is a vector in the plane and three is a vector in space, and the count is the only thing that says which you meant — there is no dimension setting to change
u = (u₁, u₂, u₃)
The components: the numbers you typed, read back as a vector. The third is 0 for a two-component input, which is not padding — that is what the same direction looks like written in three coordinates
|u|
The magnitude: every component squared, the squares added, and the square root taken. It is the first output row and the answer to how big the vector is
û
The unit vector, also called the direction: every component divided by the magnitude. It points along exactly the same line as the input and has length 1 by construction, so the values it carries are the direction and nothing else
u ÷ |u|
The division that separates the two readings. The components are what went in, the unit vector's components are that divided by the length, and this page prints both so the step is visible rather than implied — which is the one thing the sibling pages do not do
Zero vector
Refused, and the reason is narrow: its magnitude is 0, so the division for the unit vector would be 0 ÷ 0 and there is no direction to report. The zero vector is not an illegal input — the magnitude page answers the same list of zeros with 0 — but this page promises three readings and can only supply two of them
Two components
Accepted. A two-component vector is a vector in the plane, its magnitude is the same square root with two terms under it, and the third component of every output is 0
Four decimal places
How wide the outputs are written. The component rows reproduce the input exactly whenever it was a whole or finite decimal number; the magnitude is often a whole number; the unit vector is almost always rounded, since dividing by a square root rarely terminates
No unit
Components, magnitude and unit vector components are all plain numbers. Nothing here knows what the components were measured in, and all three readings carry that same unknown unit — except the unit vector, which is dimensionless

Use this page when you have one vector and want everything that can be said about it without involving a second one. The component rows are the input read back as numbers, useful when the entry was written by hand and you want to see how it was parsed; the magnitude row is how big it is; the unit vector rows are which way it points. The last two are the pair that matters most in practice, because between them they are the two halves of a vector — a size and a direction — and this page is where they can be compared directly. It is a summary rather than a substitute: if you only want the length, a page that prints only the length answers sooner, and the same goes for the direction, and for two-vector work such as adding, projecting or taking a dot product you want a page with two boxes. What this page adds is the side-by-side view. The unit vector rows are the component rows divided by the magnitude, printed in one panel, so the division can be read rather than taken on trust. Two or three components are both accepted, and the third component of a two-component vector is 0 throughout. The zero vector is the one input refused, and it is refused because one of the three promised readings does not exist for it rather than because the input is invalid.

Worked examples

  1. 3 4

    1. Components: the input read back is (3, 4, 0)
    2. Magnitude: √(9 + 16) = √25 = 5
    3. Unit vector x: 3 ÷ 5 = 0.6
    4. Unit vector y: 4 ÷ 5 = 0.8
    5. Unit vector z: 0 ÷ 5 = 0

    The input the page loads with, and the row that shows why the components are printed at all. Every number of the second group is a number of the first group divided by 5, and having both groups on screen means the division can be read off rather than worked out. The magnitude is a whole number here because 3-4-5 is a right triangle, which is also why the two unit vector components come out exact. Check the division the other way: 0.6 times 5 is 3 and 0.8 times 5 is 4, so multiplying the unit vector by the magnitude gives the vector back.

  2. 0 0 5

    1. Components: the input read back is (0, 0, 5)
    2. Magnitude: √(0 + 0 + 25) = 5
    3. Unit vector x: 0 ÷ 5 = 0
    4. Unit vector y: 0 ÷ 5 = 0
    5. Unit vector z: 5 ÷ 5 = 1

    A vector lying along the z axis, and the case where the component rows earn their place most clearly. The input as typed, 0 0 5, could be read as a vector with one number in it; the component rows make it plain that it is a three-dimensional vector whose first two entries happen to be zero. The unit vector is then the axis direction itself, 0 0 1, and the third reading is the easiest possible check on the division: 5 divided by 5 is 1 and 0 divided by 5 is 0.

  3. 2 3 6

    1. Components: (2, 3, 6)
    2. Magnitude: √(4 + 9 + 36) = √49 = 7
    3. Unit vector x: 2 ÷ 7 = 0.285714
    4. Unit vector y: 3 ÷ 7 = 0.428571
    5. Unit vector z: 6 ÷ 7 = 0.857143

    The ordinary three-dimensional case, and the one that shows the three readings are genuinely different numbers. The magnitude is a whole number, 7, while none of the unit vector components is: all three are repeating decimals rounded to four places. The components themselves are exact, and comparing them with the unit vector group is the whole calculation — 2 over 7, 3 over 7, 6 over 7. Notice also that the largest component, 6, gives the largest unit vector component, since dividing three numbers by the same value cannot reorder them.

  4. −3 4

    1. Components: (−3, 4, 0)
    2. Magnitude: √(9 + 16) = 5, the same as for 3 4
    3. Unit vector x: −3 ÷ 5 = −0.6
    4. Unit vector y: 4 ÷ 5 = 0.8
    5. Unit vector z: 0 ÷ 5 = 0

    The first example with one sign changed, and the row that shows which of the three readings the sign reaches. The magnitude is unchanged at 5, because negating a component does not change the sum of its squares. The components keep the sign, obviously. The unit vector keeps it too, because dividing by a positive length cannot turn a vector round — so of the three readings, only the component and unit vector rows carry the direction, and the magnitude is the one that cannot. Build the page's own table beside this: the two rows sit next to each other and differ in exactly one sign.

Limitations

Two or three components are accepted and nothing else. Overlaps with the neighbouring tools are real and worth naming, because this page is a summary and the siblings are specialists: the magnitude row carries exactly the same number as the vector magnitude page, the three unit vector rows carry exactly the same numbers as the unit vector page, and neither of those pages prints the components. If what you want is one of those single answers, the shorter page gives it sooner; what this page adds is the components beside the unit vector, which is the only place the division is visible as a division. It handles one vector, so anything involving two — adding, subtracting, projecting, dot products, angles — belongs on the pages that take two boxes. The zero vector is refused: its magnitude is 0 and it has no direction, so the unit vector rows could not be filled, and the panel prints a number for every row or none. That refusal is about this page's promise and not about the input, which the magnitude page answers with 0. Components are read as ordinary numbers: a comma followed by a space separates components, a comma with no space after it is read as a decimal point (1,5 is one and a half), and a thousands grouping is refused rather than guessed at — write 1500, not 1,500. A two-component vector is accepted and its third component is 0 throughout rather than missing. Nothing here knows what the components were measured in — the unit vector is dimensionless, and the components and the magnitude carry whatever unit the input did. Four decimal places is a display width rather than a claim of precision.

Frequently asked questions

What does this page give me that the other vector pages do not?
The components, printed as numbers beside the unit vector they were divided into. The magnitude row is the same number the vector magnitude page gives and the unit vector rows are the same numbers the unit vector page gives, so the readings themselves are not new. What is new is having them in one panel with the components, which is the only place where you can see 3 and 4 in one group and 0.6 and 0.8 in the next and read the division straight off.
Which of the numbers is the direction?
The three unit vector rows, and they have to be read together: one component alone is not a direction. The unit vector points along exactly the same line as the vector you typed, with the length divided out, so its own length is 1 in every case and the values it holds are purely about direction. The magnitude row above it is a single number and cannot express a direction at all, which is why all three rows are needed.
Why are the components printed when I typed them in myself?
Because seeing the input as numbers next to the unit vector is the point of the page. It also settles how the entry was read: 0 0 5 as typed could be taken for a vector with one number in it, and the component rows show that it is a three-dimensional vector with two zero entries. Without them the panel would show a magnitude and a direction with no visible connection between the input and either.
Why is the zero vector refused when the magnitude page accepts it?
Because this page promises three readings and only two of them exist for the zero vector: the components are 0 0 0 and the magnitude is 0, but there is no direction — normalising it would mean dividing by a length of zero. The magnitude page promises one reading and can supply it, so the same input is answered there. The panel prints a value for every row, so a partly empty result is not something this page can show.
How is this different from the vector magnitude calculator?
That page answers one question and this one answers three; the magnitude number itself is identical on both. If the length is all you want, the shorter page gets there sooner. This page is for when you want the length and the direction and want to see how they relate — the unit vector components are the components divided by the magnitude, and having both on screen turns that into something you can check rather than something you take on trust.
Can I enter a two-dimensional vector?
Yes, and the third component of every row comes back as 0. A two-component vector is a vector in the plane, which is the same thing as a three-dimensional vector whose third entry is 0, so one panel serves both without a dimension setting. The magnitude is the same square root with two terms under it, and the unit vector is the two components divided by that length.

References

Related calculators