Skip to content

Main content

Cosine Coordinate Term Tool

Return one coordinate's contribution to cosine similarity from supplied full-vector L2 norms.

Loading tool…

Description

Multiply firstCoordinate/firstNorm by secondCoordinate/secondNorm.

A vector has ordered coordinates. Its length and direction are different properties: scaling changes length, while normalization retains direction when the vector is nonzero. Coordinate order and the chosen axes determine the interpretation.

Multiply firstCoordinate/firstNorm by secondCoordinate/secondNorm.

When to use this tool

Use Cosine Coordinate Term when you need a small coordinate transformation or a direction calculation under an explicit axis convention.

How to use the tool and how it works

  1. Enter firstCoordinate, secondCoordinate, firstNorm, secondNorm. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read contribution. Use the output convention below.

Require positive norms and absolute coordinates no greater than their respective norms. Multiply firstCoordinate/firstNorm by secondCoordinate/secondNorm.1

Input fieldMeaning and unitsAccepted input
firstCoordinateFirst CoordinateRequired. Finite number.
secondCoordinateSecond CoordinateRequired. Finite number.
firstNormFirst NormRequired. Finite number; strictly above 0.
secondNormSecond NormRequired. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
contributionContributionRequired. Finite number.
json
{
  "input": {
    "firstCoordinate": 3,
    "secondCoordinate": 4,
    "firstNorm": 5,
    "secondNorm": 5
  },
  "output": {
    "contribution": 0.48
  }
}

Limitations and assumptions

  • This is one cosine-similarity contribution, potentially signed; supplied norms and vector correspondence are not independently computed or verified.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Verify the coordinate system and use a complete transformation matrix when several transformations must be composed.

References

  1. Calculation and input contract: similarity/cosine-coordinate-term — tool.io

Similar or alternative tools