Vector

Depending on the context, a vector can refer to three different concepts:

  1. In mathematics, a vector is a quantity with both magnitude and direction.
  2. In computer graphics, vectors define shapes and paths that can be scaled without losing quality.
  3. In computer science, a vector is a dynamic data structure that can grow or shrink as needed.

1. Mathematical Vectors

A mathematical vector is a quantity defined by two values:

  1. magnitude (length)
  2. direction (angle)

It can be represented visually as an arrow, where the length of the arrow is the magnitude, and the way it points is the direction. For example, one vector may be illustrated by a 2-centimeter arrow pointing at 45 degrees, while another might be 4 centimeters long and point at 30 degrees. Vectors are commonly used in physics, engineering, and other fields to represent movement, force, and velocity.

2. Vectors in Computer Graphics

In computer graphics, a vector graphic is an image comprised of points, lines, and curves defined by mathematical formulas. Unlike raster graphics, which store image data as pixels, vector images can be scaled to any size without becoming blurry or pixelated. Common file formats that use vector graphics include .SVG, .EPS, and .AI (Adobe Illustrator) files.

3. Vectors in Computer Science

In computer science, a vector refers to a dynamic array — a data structure used to store a sequence of values. Unlike a regular array, which has a fixed size, a vector can automatically expand or shrink as elements are added or removed. Vectors manage memory dynamically. They typically use a heap instead of the stack, giving them greater flexibility.

Many programming languages, such as C++ and Java, include built-in vector classes that automatically handle memory allocation and resizing.

Updated June 20, 2025 by Per C.

quizTest Your Knowledge

Which of the following is an organization that creates technology standards?

A
OASIS
0%
B
OATLY
0%
C
OSTRICH
0%
D
ORAGAMI
0%
Correct! Incorrect!     View the OASIS definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Vector on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation bar directly below the definition.

Our goal to explain computer terminology in a way that is easy to understand. We strive for accuracy and simplicity with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

TechTerms Newsletter

Improve your technical knowledge with our daily or weekly newsletter! Subscribe today and get new terms and quizzes delivered to your inbox.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.