Goal
Calculate the vector projection of A onto nonzero vector B from their ordered three-dimensional components.
Worldwide context
Saved once here, used across the site.
Currency changes display only. Country selection guides tax input; no tax rate is guessed.
Calculate the vector projection of A onto nonzero vector B from their ordered three-dimensional components.
proj_B(A) = (A dot B)/(B dot B) B.A clearer path to an answer
This page keeps the calculation transparent: define the goal, enter the matching values, inspect the method, and decide what the result means in your situation.
Calculate the vector projection of A onto nonzero vector B from their ordered three-dimensional components.
Vector A x · Vector A y · Vector A z · Vector B x · Vector B y · Vector B z
proj_B(A) = (A dot B)/(B dot B) B.
Calculate, review the assumptions below, then compare a related tool when the decision needs more context.
Calculate the vector projection of A onto nonzero vector B from their ordered three-dimensional components.
Open the Projection of One 3D Vector onto Another pageMore math tools
Download PDFDownload Word (.doc)
Enter your values above and choose Calculate to see the result here.
Calculation map
proj_B(A) = (A dot B)/(B dot B) B.
Bounded, transparent calculation
Your recent runs stay in this browser session only.
Formula: proj_B(A) = (A dot B)/(B dot B) B.
The vector projection of A onto nonzero B is the component of A parallel to B. The scalar dot-product ratio multiplies each ordered component of B.
Worked example: The projection of A onto B is (3, 0, 0).
The displayed limits are checked before the handler runs. Model-specific domain checks may also reject impossible or non-finite inputs.
Methodology: This calculator follows the WorldCalculate input, formula, precision, and boundary policy. Read the official methodology.
Calculator usage statistics
This section counts anonymous successful Calculate submissions, not unique visitors. Counts and top tools appear only when trusted aggregate data is available; country analysis is shown only under the same condition and reporting threshold.
Answer-first guide
Calculate the vector projection of A onto nonzero vector B from their ordered three-dimensional components. Start with one clearly defined goal, enter values in the units shown, and keep the result attached to the assumptions below.
This tool is useful when your question includes vector projection, projection onto vector, parallel component. It returns the outputs declared in the calculator contract rather than a live quote, approval, diagnosis, or professional sign-off.
Vector A x · Vector A y · Vector A z · Vector B x · Vector B y · Vector B z. Keep the same time period, unit system, and currency wherever the form requires comparable values.
Run the worked example first, compare its output with the page's example, then change one input at a time. This makes an unexpected result easier to trace to a unit, boundary, or assumption.
Need a wider view? Browse Math Calculators or compare the related tools below. The WorldCalculate methodology explains how formulas, examples, limits, and revisions are reviewed.
proj_B(A) = (A dot B)/(B dot B) B.
The vector projection of A onto nonzero B is the component of A parallel to B. The scalar dot-product ratio multiplies each ordered component of B.
The projection of A onto B is (3, 0, 0).
Context and background
Math calculators move from named quantities to a relation, then to a result that can be checked with substitution, units, or an alternate form.
Arithmetic, algebra, geometry, trigonometry, and number theory provide reusable structures for classroom work and everyday reasoning. Each page narrows that structure to one declared problem.
Research and review
Researched by Hassan ALRowaie, Founder and editorial researcher at WorldCalculate.
This guide follows the live calculator's declared inputs, formula, worked example, assumptions, validation boundaries, and source-backed methodology. The review date describes editorial review of the calculator explanation; it is not a promise that external facts or rates remain current.
Vector projection extracts the part of vector A that lies along vector B. This calculator reads six ordered Cartesian components, forms the scalar ratio (A dot B)/(B dot B), and multiplies that ratio by B. It returns projection x, projection y, and projection z in that order. Vector B must be nonzero because B dot B is the denominator and a zero vector has no reference direction. The page does not return the perpendicular residual, assign physical units, or decide whether the vectors represent force, displacement, velocity, or a surface direction. This guide follows the exact formula and bounds, with worked examples, orthogonality checks, edge cases, common mistakes, privacy guidance, and model limits.
The projection asks which vector parallel to B represents the component of A that points along B. The result is itself a vector, so its three entries remain in x, y, z order. Unlike a dot product, the output is not a single scalar. Unlike a magnitude, it preserves a direction along the reference vector and can point opposite to B when A has a negative component along B.
The reference vector is B, not A. Projecting A onto B generally differs from projecting B onto A because the denominators and resulting directions differ. The notation proj_B(A) makes that dependency explicit. The form labels A and B consistently so a user can distinguish the vector being decomposed from the direction receiving its parallel component.
The projection is one part of a useful decomposition. If P is the returned projection, then the residual A - P is perpendicular to B under the Euclidean dot product. The calculator does not return that residual, but the identity is a valuable independent check and explains why projection matters in geometry and vector analysis.
Enter A as ax, ay, az and B as bx, by, bz. The x, y, and z suffixes determine the matching products in the dot product and the components in the final vector. Each value accepts a finite number from negative 1,000,000 through positive 1,000,000. Negative values are expected in problems where a component points opposite to a positive axis.
The engine validates each number independently, including direct calls that bypass the HTML form. It then checks B's Euclidean norm before calculating the denominator. The input limits keep multiplication and division bounded for ordinary browser use; they do not imply that a vector outside the range is mathematically impossible. A blank, string, non-finite value, or out-of-range number is not silently coerced.
Keep one coordinate basis and compatible unit convention. Projection is not a unit conversion. If B's x component is measured in one scale and its y component in another, the ordinary dot product may not describe the intended direction. Resolve that issue before entry rather than expecting the form to infer a metric.
The formula is proj_B(A) = (A dot B)/(B dot B) B. First calculate A dot B from matching components. Then calculate B dot B = bx^2 + by^2 + bz^2. Since B is nonzero, B dot B is positive. Divide the first scalar by the second to obtain a scale factor, then multiply that factor by bx, by, and bz separately.
For A = (3, 4, 0) and B = (1, 0, 0), A dot B = 3 and B dot B = 1. The scale is 3, so the output is (3, 0, 0). The y component of A does not appear in the projection because it is perpendicular to the x-axis reference. It remains in the residual rather than being incorrectly included in the parallel output.
The result entries are checked for finiteness after multiplication and normalized away from negative zero. The handler does not clamp the scale or the components to the input bounds. A projection can have a component outside an individual input's interval in other bounded scenarios, but the K1 input range keeps this family well within finite arithmetic.
The default example projects (3, 4, 0) onto (1, 0, 0), producing (3, 0, 0). The projection keeps the x component and removes the y component because B lies on the x-axis. The residual is (0, 4, 0), whose dot product with B is zero. This axis case makes the parallel and perpendicular parts easy to see.
Project A = (2, 2, 0) onto B = (1, 1, 0). The numerator is 4, the denominator is 2, and the scale is 2. The output is (2, 2, 0), meaning A already lies along B. The residual is zero. A vector parallel to a nonzero reference projects to itself, even when the reference is not a unit vector.
For A = (1, 2, 3) and B = (0, 1, 1), the numerator is 5 and the denominator is 2, so the output is (0, 2.5, 2.5). The residual is (1, -0.5, 0.5). Its dot product with B is zero: -0.5 + 0.5 = 0. This check confirms both the component formula and the reference direction.
If B is (0, 0, 0), B dot B is zero and the projection is undefined. There is no line or direction onto which A can be projected. The handler rejects this case using the norm check before division. A may be zero without causing a problem: the projection of the zero vector onto any valid nonzero B is the zero vector.
A projection can point opposite to B. If A dot B is negative, the scale factor is negative and every nonzero B component is reversed in the output. This is not an error and should not be changed to an absolute value. Taking an absolute value would report the direction of B even when A's parallel component points the other way.
Nearly zero B vectors are eligible when they are finite and nonzero, but the denominator can make the scale sensitive to input precision. The bounded engine checks finite results; it does not add an arbitrary lower threshold beyond the exact nonzero domain. Assess measurement quality separately when the reference is nearly zero.
The projection is the foot of the perpendicular component decomposition in vector form. Draw the line through the origin in the direction of B. The returned vector lies on that line and is the closest point on the line to the endpoint of A under ordinary Euclidean geometry. This visual statement depends on the coordinate metric and does not mean the calculator solves a general constrained optimization problem.
The scalar projection of A onto B is (A dot B)/|B|, while the vector projection is that scalar times the unit direction B/|B|. The K1 page returns the vector form directly through (A dot B)/(B dot B) B. Keeping these two outputs distinct avoids confusing a signed length with a three-component result.
A cross product is another way to reason about perpendicularity in 3D, but it answers a different question and needs a different output. The dot product of A minus its projection with B is the direct orthogonality check for this tool. Use the operation that matches the output contract instead of swapping formulas because the words parallel and perpendicular appear in both explanations.
Common mistakes include dividing by |B| instead of B dot B while still returning a vector, projecting onto A by reversing the roles, and normalizing B without accounting for the second norm. Another is using the absolute numerator and erasing a negative parallel direction. Write the full ratio and identify the target vector before doing component multiplication.
To verify a result P, test that P is a scalar multiple of B and that (A - P) dot B is zero within a suitable numerical tolerance. If A is parallel to B, P should equal A. If A is perpendicular to B, P should be zero. If A is zero, P should be zero for every valid B. These cases exercise scale, orthogonality, and zero-source behavior.
If a reference answer differs, compare whether it reports a scalar projection, a unit-direction projection, or a residual. Check coordinate order and whether B was normalized first. The page's labels and three-result order are designed to make that distinction inspectable.
The model is a finite Euclidean projection in a standard Cartesian basis. It does not handle weighted inner products, oblique bases, curved surfaces, least-squares matrices, or time-dependent frames. It also does not infer a surface normal, collision response, or physical work decomposition from the component names. Those applications require additional definitions and often additional data.
Vectors can encode paths, sensor readings, body motion, locations, or proprietary geometry. Enter only the six numbers needed and avoid names, account details, credentials, or raw sensitive records. When sharing the result, include the coordinate convention only when necessary and protect the source data. The simple arithmetic interface should not be treated as a privacy classification tool.
Do not use a projected vector alone to authorize a robot movement, approve a structural load path, interpret a medical image, or make another safety-critical decision. Validate the source frame, units, sensor quality, uncertainty, and downstream physical model with suitable software and qualified reviewers.
Why is B required to be nonzero while A is not? B supplies both the direction line and the denominator B dot B. A can be zero because its projection onto any valid line is the zero vector. A zero reference has neither a direction nor a usable denominator, so no unique projection exists.
Does the projection always have the same length as A? No. Its length is the absolute size of A's parallel component and can be smaller than, equal to, or in the special zero case less than A's length. It points along B or opposite to B. The removed residual contains the perpendicular component.
Can I project onto a non-unit B? Yes. The B dot B denominator accounts for B's scale, so the result is independent of positive rescaling of the reference vector. Replacing B with 10B gives the same projection. Replacing B with -B also gives the same vector projection because both numerator and denominator behavior preserve the same target line.
A projection result is easiest to reuse when the roles of A and B remain explicit. A is the vector being decomposed, while B defines the target line. Store the six inputs with the three output components and the scalar factor (A dot B)/(B dot B). If the same vector pair is later used for a residual or an angle, this record prevents the reference direction from being silently swapped.
The projection has two defining checks. First, the output P must be a scalar multiple of B, so its component ratios agree wherever the corresponding B component is nonzero. Second, the residual R = A - P must satisfy R dot B = 0 under the Euclidean model. The first check tests that the output lies on the target line; the second tests that no parallel part remains in the residual.
Reference scaling should not change the vector projection. Replacing B with kB for any nonzero scalar k describes the same line, and the numerator, denominator, and final multiplication cancel the scale. Replacing B with -B should also return the same P even though the scalar factor changes sign. These invariants are useful for catching a missing denominator or a result that accidentally uses a unit vector without the correct scale.
The sign of the scalar factor matters. A negative factor means the nearest point on the target line lies on the side opposite to the entered B direction. Taking an absolute value would preserve the line but change the vector result and erase information about A's signed alignment. The calculator returns the signed vector projection so the residual and reconstruction identities remain valid.
Numerical sensitivity increases when B is very small. Mathematically, a nonzero B still defines a line, but a measured reference close to zero may be dominated by noise and its squared norm can amplify the scale factor. The handler enforces finite arithmetic and the exact nonzero domain. It does not choose a universal practical threshold because that threshold depends on units, instrument precision, and the surrounding application.
Projection is related to, but distinct from, several familiar operations. The dot product supplies a scalar numerator. The scalar projection divides by |B|, while the vector projection divides by B dot B and multiplies B. The perpendicular residual subtracts the vector projection from A. Naming the intended output avoids reporting a signed length when a three-component vector is required.
For a final handoff, include the coordinate basis, units, source roles, denominator, projection, and residual check. If the result will drive a physical or visual system, document how the direction, magnitude, and uncertainty are consumed there. The K1 page makes the geometric arithmetic transparent, but it does not validate a collision, load, movement, or other real-world outcome.
Projection is linear in the source vector A and unchanged by nonzero rescaling of the reference line B. Those properties can guide data review: doubling A should double P, while replacing B with an equivalent scaled or reversed direction should preserve P. If either identity fails beyond tolerance, inspect the denominator, role labels, and component multiplication.
The residual identity also gives a reconstruction check. Add the returned projection P to the residual A - P and compare the sum with the original A. This confirms that the projected component has not been rounded too early or that a coordinate has not been dropped. The page does not return the residual, so a caller must compute it from the original A and returned components.
A negative projection is often useful information in signed decompositions. It says that the closest point on the reference line lies opposite the entered B direction. In a visualization, draw the arrow with that sign rather than flipping it for convenience. In a physical model, confirm how the receiving formula treats signed work, velocity, or load components before using the result.
For large or noisy data, compare the magnitude of B with the expected measurement resolution. The exact nonzero rule is enough for mathematical input, but a very small reference can make P sensitive to small changes in A and B. A caller may need a stronger application-level rejection rule, documented in units and relative scale, without changing the general-purpose handler contract.
A final integration record should identify whether the result is a vector projection onto a line, a scalar component, a surface projection, or a graphics operation. Similar words can hide different formulas. Preserve the explicit K1 output labels and state which later calculation consumes them so a correct three-component result is not silently substituted into a scalar-only interface.
The projection can be checked through a closest-point argument as well as through algebra. For every point Q on the reference line spanned by B, the returned P should make the residual A - P no longer point toward the line. Under the Euclidean metric this is equivalent to the residual being perpendicular to B. The calculator does not enumerate candidate points, so the dot-product identity is the practical numeric check.
If B is normalized before it reaches another operation, remember that the vector projection onto the original line should not change, while the scalar component along a unit direction may have a different numeric meaning. Store whether a reported scalar was measured along B or along B divided by its norm. This distinction prevents two valid projection conventions from being compared as if they were identical outputs.
A projection may be zero even when A is not zero. That occurs when A is perpendicular to B and is often an intended result. It should not be treated as missing data or as an engine failure. Conversely, a nonzero result does not prove that the source vector lies on the reference line; only the residual check can establish whether the perpendicular part is absent.
When projection is used in a sequence of coordinate operations, apply every operation in one declared frame. Projecting in a local frame and interpreting the components in a world frame can produce a plausible vector with the wrong direction. The handler's pure arithmetic makes no frame assumptions beyond the shared Cartesian basis stated in the catalog, so frame conversion belongs before or after it and must be documented.
Calculate the vector projection of A onto nonzero vector B from their ordered three-dimensional components.
proj_B(A) = (A dot B)/(B dot B) B. The vector projection of A onto nonzero B is the component of A parallel to B. The scalar dot-product ratio multiplies each ordered component of B.
Enter Vector A x, Vector A y, Vector A z, Vector B x, Vector B y, Vector B z, then choose Calculate.
A and B are Cartesian 3D vectors in one common Euclidean basis, and B is nonzero. The result is a geometric projection only; no unit conversion, physical force decomposition, or perpendicular component is inferred.
This calculator is part of the WorldCalculate library. Its formula, example, assumptions, input bounds, and output formatting follow the official methodology.
These WorldCalculate collections connect this tool with related questions while keeping each calculation separate and transparent.