Search by Algolia
How personalization boosts customer engagement
e-commerce

How personalization boosts customer engagement

You land on your favorite retailer’s website, where everything seems to be attractively arranged just for you. Your favorite ...

Jon Silvers

Director, Digital Marketing

What is retail analytics and how can it inform your data-driven ecommerce merchandising strategy?
e-commerce

What is retail analytics and how can it inform your data-driven ecommerce merchandising strategy?

There is such tremendous activity both on and off of retailer websites today that it would be impossible to make ...

Catherine Dee

Search and Discovery writer

8 ways to use merchandising data to boost your online store ROI
e-commerce

8 ways to use merchandising data to boost your online store ROI

New year, new goals. Sounds positive, but looking at your sales data, your revenue and profit aren’t so hot ...

John Stewart

VP, Corporate Communications and Brand

Algolia DocSearch + Astro Starlight
engineering

Algolia DocSearch + Astro Starlight

What is Astro Starlight? If you're building a documentation site, your content needs to be easy to write and ...

Jaden Baptista

Technical Writer

What role does AI play in recommendation systems and engines?
ai

What role does AI play in recommendation systems and engines?

You put that in your cart. How about this cool thing to go with it? You liked that? Here are ...

Catherine Dee

Search and Discovery writer

How AI can help improve your user experience
ux

How AI can help improve your user experience

They say you get one chance to make a great first impression. With visual design on ecommerce web pages, this ...

Jon Silvers

Director, Digital Marketing

Keeping your Algolia search index up to date
product

Keeping your Algolia search index up to date

When creating your initial Algolia index, you may seed the index with an initial set of data. This is convenient ...

Jaden Baptista

Technical Writer

Merchandising in the AI era
e-commerce

Merchandising in the AI era

For merchandisers, every website visit is an opportunity to promote products to potential buyers. In the era of AI, incorporating ...

Tariq Khan

Director of Content Marketing

Debunking the most common AI myths
ai

Debunking the most common AI myths

ARTIFICIAL INTELLIGENCE CAN’T BE TRUSTED, shouts the headline on your social media newsfeed. Is that really true, or is ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

How AI can benefit the retail industry
ai

How AI can benefit the retail industry

Artificial intelligence is on a roll. It’s strengthening healthcare diagnostics, taking on office grunt work, helping banks combat fraud ...

Catherine Dee

Search and Discovery writer

How ecommerce AI is reshaping business
e-commerce

How ecommerce AI is reshaping business

Like other modern phenomena such as social media, artificial intelligence has landed on the ecommerce industry scene with a giant ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

AI-driven smart merchandising: what it is and why your ecommerce store needs it
ai

AI-driven smart merchandising: what it is and why your ecommerce store needs it

Do you dream of having your own personal online shopper? Someone familiar and fun who pops up every time you ...

Catherine Dee

Search and Discovery writer

NRF 2024: A cocktail of inspiration and innovation
e-commerce

NRF 2024: A cocktail of inspiration and innovation

Retail’s big show, NRF 2024, once again brought together a wide spectrum of practitioners focused on innovation and transformation ...

Reshma Iyer

Director of Product Marketing, Ecommerce

How AI-powered personalization is transforming the user and customer experience
ai

How AI-powered personalization is transforming the user and customer experience

In a world of so many overwhelming choices for consumers, how can you best engage with the shoppers who visit ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

Unveiling the future: Algolia’s AI revolution at NRF Retail Big Show
algolia

Unveiling the future: Algolia’s AI revolution at NRF Retail Big Show

Get ready for an exhilarating journey into the future of retail as Algolia takes center stage at the NRF Retail ...

John Stewart

VP Corporate Marketing

How to master personalization with AI
ai

How to master personalization with AI

Picture ecommerce in its early days: businesses were just beginning to discover the power of personalized marketing. They’d divide ...

Ciprian Borodescu

AI Product Manager | On a mission to help people succeed through the use of AI

5 best practices for nailing the ecommerce virtual assistant user experience
ai

5 best practices for nailing the ecommerce virtual assistant user experience

“Hello there, how can I help you today?”, asks the virtual shopping assistant in the lower right-hand corner ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

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

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