Search by Algolia
Add InstantSearch and Autocomplete to your search experience in just 5 minutes
product

Add InstantSearch and Autocomplete to your search experience in just 5 minutes

A good starting point for building a comprehensive search experience is a straightforward app template. When crafting your application’s ...

Imogen Lovera

Senior Product Manager

Best practices of conversion-focused ecommerce website design
e-commerce

Best practices of conversion-focused ecommerce website design

The inviting ecommerce website template that balances bright colors with plenty of white space. The stylized fonts for the headers ...

Catherine Dee

Search and Discovery writer

Ecommerce product listing pages: what they are and how to optimize them for maximum conversion
e-commerce

Ecommerce product listing pages: what they are and how to optimize them for maximum conversion

Imagine an online shopping experience designed to reflect your unique consumer needs and preferences — a digital world shaped completely around ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

DevBit Recap: Winter 2023 — Community
engineering

DevBit Recap: Winter 2023 — Community

Winter is here for those in the northern hemisphere, with thoughts drifting toward cozy blankets and mulled wine. But before ...

Chuck Meyer

Sr. Developer Relations Engineer

How to create the highest-converting product detail pages (PDPs)
e-commerce

How to create the highest-converting product detail pages (PDPs)

What if there were a way to persuade shoppers who find your ecommerce site, ultimately making it to a product ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

Highlights from GopherCon Australia 2023
engineering

Highlights from GopherCon Australia 2023

This year a bunch of our engineers from our Sydney office attended GopherCon AU at University of Technology, Sydney, in ...

David Howden
James Kozianski

David Howden &

James Kozianski

Enhancing customer engagement: The role of conversational commerce
e-commerce

Enhancing customer engagement: The role of conversational commerce

Second only to personalization, conversational commerce has been a hot topic of conversation (pun intended) amongst retailers for the better ...

Michael Klein

Principal, Klein4Retail

Craft a unique discovery experience with AI-powered recommendations
product

Craft a unique discovery experience with AI-powered recommendations

Algolia’s Recommend complements site search and discovery. As customers browse or search your site, dynamic recommendations encourage customers to ...

Maria Lungu

Frontend Engineer

What are product detail pages and why are they critical for ecommerce success?
e-commerce

What are product detail pages and why are they critical for ecommerce success?

Winter is coming, along with a bunch of houseguests. You want to replace your battered old sofa — after all,  the ...

Catherine Dee

Search and Discovery writer

Why weights are often counterproductive in ranking
engineering

Why weights are often counterproductive in ranking

Search is a very complex problem Search is a complex problem that is hard to customize to a particular use ...

Julien Lemoine

Co-founder & former CTO at Algolia

How to increase your ecommerce conversion rate in 2024
e-commerce

How to increase your ecommerce conversion rate in 2024

2%. That’s the average conversion rate for an online store. Unless you’re performing at Amazon’s promoted products ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

How does a vector database work? A quick tutorial
ai

How does a vector database work? A quick tutorial

What’s a vector database? And how different is it than a regular-old traditional relational database? If you’re ...

Catherine Dee

Search and Discovery writer

Removing outliers for A/B search tests
engineering

Removing outliers for A/B search tests

How do you measure the success of a new feature? How do you test the impact? There are different ways ...

Christopher Hawke

Senior Software Engineer

Easily integrate Algolia into native apps with FlutterFlow
engineering

Easily integrate Algolia into native apps with FlutterFlow

Algolia's advanced search capabilities pair seamlessly with iOS or Android Apps when using FlutterFlow. App development and search design ...

Chuck Meyer

Sr. Developer Relations Engineer

Algolia's search propels 1,000s of retailers to Black Friday success
e-commerce

Algolia's search propels 1,000s of retailers to Black Friday success

In the midst of the Black Friday shopping frenzy, Algolia soared to new heights, setting new records and delivering an ...

Bernadette Nixon

Chief Executive Officer and Board Member at Algolia

Generative AI’s impact on the ecommerce industry
ai

Generative AI’s impact on the ecommerce industry

When was your last online shopping trip, and how did it go? For consumers, it’s becoming arguably tougher to ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What’s the average ecommerce conversion rate and how does yours compare?
e-commerce

What’s the average ecommerce conversion rate and how does yours compare?

Have you put your blood, sweat, and tears into perfecting your online store, only to see your conversion rates stuck ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What are AI chatbots, how do they work, and how have they impacted ecommerce?
ai

What are AI chatbots, how do they work, and how have they impacted ecommerce?

“Hello, how can I help you today?”  This has to be the most tired, but nevertheless tried-and-true ...

Catherine Dee

Search and Discovery writer

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

To consider the question of what vectors are, it helps to be a mathematician, or at least someone who’s comfortable thinking in a mathematical way.

If that’s not you, which it probably isn’t if you’re an ecommerce marketing manager or exec, no worries. The Web is chock full of detailed, colorfully illustrated information about vectors.

For a starting point, the Math Is Fun site, written to help elementary-through-high-school kids but welcoming to non-techies of all ages (and, there’ll be no quizzes), does a great job of summing up the concept

Improve pretrained LLMs banner

So, quick disclaimer…this blog post isn’t about to exhaustively present everything (or in some cases, anything) about vectors and vector analysis and vector graphics. No. We’re not going into the weeds on vectors. This is a post meant to highlight vector-enhanced search technology, after all. Rest assured, you know how to Google if you need details.

Meanwhile, here’s our best shot at the topic. 

How is a vector visualized?

Standard numbers are the components of a vector. The components show influence in a given direction of the vector.

Mathematicians refer to the visualization of vectors by talking about components in a coordinate system. In a two-dimensional plane, a vector logically has two components, while in a three-dimensional one, it has (you guessed it) three.

Geometrically, a vector often encompasses coordinates in an n-dimensional space (n refers to the quantity of dimensions, for instance, two). It signifies the position of a coordinate in an n-dimensional space.

In the Cartesian coordinate system, vector quantities are represented in a space with an x axis — a horizontal straight line — and a y axis — a vertical straight line that’s perpendicular to the x axis.

A given vector looks pretty simple, like a straight line capped by an arrowhead. The direction of a vector in rudimentary illustrations shows the length of the line “optimistically” slanting up at an angle, from left to right.

Vectors are typically designated in boldface (e.g., vector a and vector b).

The magnitude of a vector is indicated by a vertical bar on each side of the vector, like this: |a|.

Types of vectors

There are various types of vectors, including: 

  • A unit vector, which has a magnitude of 1
  • A zero vector (null), which has a magnitude of zero and points in no direction
  • A position vector, which denotes the location of a point with respect to an arbitrary reference point
  • The sum of two or more vectors, a resultant vector
  • An equal vector, two or more vectors with the same magnitude and direction
  • A column vector, which is when vector components are displayed vertically

The definition of a vector

So that’s a (somewhat rambling) math-based explanation of a vector.

Now let’s go in the opposite direction for a broader picture — what does Merriam-Webster use as its plain-English assessment of vectors?

The dictionary’s official definition is “a quantity that has magnitude and direction and that is usually represented by a line segment with the given direction and with a length representing the magnitude.”

Fun facts

Here are a few more data points about vectors:

  • A vector is an element of a vector space (also known as a linear space), a geometric object collection with an addition rule and a scalar multiplication rule
  • It’s an object that looks like a directed line segment (though not all vectors are directed line segments)
  • When its operations can be interpreted appropriately, it’s considered a vector
  • Physical quantities that vectors can represent include acceleration, displacement, and velocity

The role of scalars

Another way of describing a vector like it’s a scientific thing is this: A tuple that has scalars (numbers or values from a dataset). 

According to Britannica, examples of scalars include density, energy, volume, time, and mass.

The thing to know about scalars is that they don’t possess magnitude; they just “scale” vectors up and down.

A quantity that doesn’t rely on direction is a scalar quantity, according to NASA.

Dot products and cross products

How do vector operations work, besides the fact that in vector math, you can use real numbers and get the results of applying vector addition, vector subtraction, and multiplication of vectors?

  • Using a vector dot product (also known as a scalar product or inner product) — a tool for determining vector decompositions, projections, and orthogonality — you can figure out the sum of the multiplied elements of two same-length vectors to determine a scalar.
  • The vector cross product (also known as the vector product) is used to multiply two vectors. The result of cross-product a x b (read as a cross b) is a new vector running perpendicular to the a and b ones.

How are vectors used in machine learning?

For programming, vectors are an effective way to organize and store objects and object collections in containers for use in machine-learning applications. They’re used for various scenarios, such as when supervised and unsupervised learning algorithms are applied to create recommendations.

One of the most-cited examples of vectors in machine learning is support vector machines (SVMs). In this scenario, a supervised algorithm solves problems by applying classification.

Vectorizing data

Before feeding data into a machine-learning model, it is “vectorized” — converted into numbers representing a point or point sequence in the vector space.

The vectors in machine learning signify input data, including bias and weight. In the same way, output from a machine-learning model (for example, a predicted class), can be put into vector format.

A lowercase v is used to designate a vector. The magnitude of the vector (its length), as well as its origin and direction, are labeled. When training a machine-learning algorithm, the target variable may be represented by a lowercase y.

Machine learning and vector search

Now let’s look at the role of vectors in something concrete that you may be interested in: vector search.

Modern applications of vector functionality are a help for letting website users do broad-based searches and get accurate recommendations, personalization, answers to their FAQs, and more.

With semantic search, data to provide in search results can be identified using approximate nearest neighbor (ANN) algorithms.

In a machine-learning context, vector search is able to look at unstructured data — such as what’s in text, photos, or audio — and translate its context and meaning into numeric representation. This vectorization — converting words into numbers — lets the information be used for automating synonyms, clustering documents‍, detecting meaning and intent in search queries, and ranking search results.

Embeddings are n-dimensional vectors created by deep-learning algorithms to assign semantic definition to input. Other objects, like documents, images, video, and audio, can also be embedded. Machine-learning tasks have improved substantially thanks to embedding. 

The role of neural hashing

One of the challenges in working with vectors in machine learning is their size: they tend to be very long and require specialized databases and GPU management. To address this problem, neural hashing can use neural networks to compress them. The result: processing can be up to 500 times faster than when using standard vector calculations, and these hashed vectors can be run on commodity hardware.

Vector search: half a solution

Vector search is an effective new technology that works well for broad-based searches. Traditional keyword search, however, still provides the best results for searches that involve someone’s specific intentions.

For example, when someone enters “Levi’s” in a traditional keyword search-engine box, they’d see search results for only that brand — a relatively narrow information window. By contrast, a shopper’s broad-based vector search would return a wider array of similar results, like perhaps other brands that have a similar look and items in the same conceptual category.

If you want to offer your users the best search capabilities, how do you get around this challenge? You put the two together, of course.

That’s exactly what Algolia does. For the most relevant, fastest searching, we use a hybrid approach of both vector and keyword search, ensuring that your users get the best results for both exact-match queries and broad, long-tail queries. Our innovative NeuralSearch technology also scales to meet the needs of any size dataset.  

Scale up your search

That’s it for our discussion of vectors and how their presence is transforming the search industry. Want to put vectors to work on your business’s behalf? Contact us to learn how Algolia can help get you pointed in the right direction, toward higher ROI, with smart search.

About the author
Catherine Dee

Search and Discovery writer

linkedin

Recommended Articles

Powered byAlgolia Algolia Recommend

What is a vector database?
product

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What is vector search?
ai

Dustin Coates

Product and GTM Manager

How does a vector database work? A quick tutorial
ai

Catherine Dee

Search and Discovery writer