WOLFRAM

Products
  • Wolfram|One
  • Mathematica
  • Wolfram Notebook Assistant + LLM Kit
  • Wolfram|Alpha Notebook Edition
  • System Modeler
  • All Products
Consulting & Solutions
  • Wolfram Consulting
  • Industry Solutions
  • Solutions for Education
Learning & Support
  • Wolfram U Courses
  • Wolfram Language Resources
  • Wolfram Community
  • Support FAQs
  • Contact Support
Company
  • About Wolfram
  • Careers
  • Events
  • Educational Programs
  • All Sites and Resources
Wolfram|Alpha
Wolfram Cloud
Your Account
  • Your Account
  • User Portal
Search

Mechanical Systems  / Function Index  /
Previous section-----Next section

Unit
2D/3D

• Unit[vector] returns a unit vector pointed in the direction of vector.
• vector may be a simple vector or a Mech vector object with head
Vector, Line, or Plane (3D).

• Unit[bnum, lpnt] is interpreted as Unit[Vector[bnum, lpnt]].
• Other Unit[args, ... ] instances are interpreted as Unit[Line[args]].
• See also:
Direction, Magnitude.

Further Examples

Load the Modeler2D package.

In[1]:=

Direction returns the direction vector of any Mech geometry object that has the property of having a direction.

In[2]:=
Out[2]=
In[3]:=
Out[3]=

Magnitude returns the length of the direction vector of a Mech vector object, taking advantage of some simplifications.

In[4]:=
Out[4]=

Similarly, Unit takes advantage of the fact that the magnitude of the vector is not a function of the coordinate system that the vector is expressed in. If the vector is already expressed in global coordinates, then such simplifications are not possible.

In[5]:=
Out[5]=
In[6]:=
Out[6]=


  • Products
  • Wolfram|One
  • Mathematica
  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps
  • Finance Platform
  • System Modeler
  • Wolfram Player
  • Wolfram Engine
  • WolframScript
  • Wolfram Workbench
  • Volume & Site Licensing
  • Enterprise Private Cloud
  • Application Server
  • View all...
  • Services
  • Technical Consulting
  • Corporate Consulting
  • For Customers
  • Online Store
  • Product Registration
  • Product Downloads
  • Service Plans Benefits
  • User Portal
  • Your Account
  • Support
  • Support FAQ
  • Customer Service
  • Contact Support
  • Learning
  • Wolfram Language Documentation
  • Wolfram Language Introductory Book
  • Get Started with Wolfram
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Webinars & Training
  • Wolfram U
  • Summer Programs
  • Videos
  • Books
  • Public Resources
  • Wolfram|Alpha
  • Demonstrations Project
  • Resource System
  • Connected Devices Project
  • Wolfram Data Drop
  • Wolfram + Raspberry Pi
  • Wolfram Science
  • Computer-Based Math
  • MathWorld
  • Hackathons
  • Computational Thinking
  • View all...
  • Company
  • Events
  • About Wolfram
  • Careers
  • Contact
  • Connect
  • Wolfram Community
  • Wolfram Blog
  • Newsletter
© 2025 Wolfram
  • Legal & Privacy Policy
  • Site Map
  • WolframAlpha.com
  • WolframCloud.com