# Using Vector Functions

SingleStore provides a native vector data type and supports similarity searches over vector data using k-nearest neighbor search (kNN) and indexed Approximate Nearest Neighbor (ANN) search. Indexed ANN search can greatly improve the performance of queries over large vector data sets.

## Resources

The following resources provide information about SingleStore's vector processing:

* [Vector Type](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-types/vector-type.md): The native vector data type. 
* [Working with Vector Data](https://docs.singlestore.com/db/v9.1/developer-resources/functional-extensions/working-with-vector-data.md): Vector similarity search.
* [How to Bulk Load Vectors](https://docs.singlestore.com/db/v9.1/developer-resources/functional-extensions/how-to-bulk-load-vectors.md): Load larger vector data sets using a binary format.
* [Vector Indexing](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/vector-indexing.md): Indexed Approximate Nearest Neighbor (ANN) vector similarity search.
* [Hybrid Search - Re-ranking and Blending Searches](https://docs.singlestore.com/db/v9.1/developer-resources/functional-extensions/hybrid-search-re-ranking-and-blending-searches.md): Combine indexed (ANN) vector similarity search and full-text search.
* [Tuning Vector Indexes and Queries](https://docs.singlestore.com/db/v9.1/developer-resources/functional-extensions/tuning-vector-indexes-and-queries.md): Adjust the index building and searching parameters to meet your application's needs for query accuracy and performance.

The following functions are available for the vector type:

* [DOT\_PRODUCT](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/dot-product.md): Calculate the dot product of two vectors.
* [EUCLIDEAN\_DISTANCE](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/euclidean-distance.md): Calculate the Euclidean distance between two vectors.
* [Cosine Similarity and Cosine Distance](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/cosine-similarity-and-cosine-distance.md): Calculate the cosine similarity and distance metrics.
* [SCALAR\_VECTOR\_MUL](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/scalar-vector-mul.md): Multiply a vector by a scalar value.
* [VECTOR\_ADD](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/vector-add.md): Add two vectors.
* [VECTOR\_ELEMENTS\_SUM](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/vector-elements-sum.md): Sum all the elements in a vector.
* [VECTOR\_KTH\_ELEMENT](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/vector-kth-element.md): Find the kth element of a vector.
* [VECTOR\_MUL](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/vector-mul.md): Multiply two vectors element-wise.
* [VECTOR\_NUM\_ELEMENTS](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/vector-num-elements.md): Count the number of elements in a vector.
* [VECTOR\_SORT](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/vector-sort.md): Sort a vector.
* [VECTOR\_SUB](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/vector-sub.md): Subtract one vector from a second vector.

***

Modified at: April 30, 2024

Source: [/db/v9.1/reference/sql-reference/vector-functions/using-vector-functions/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/vector-functions/using-vector-functions/)

(An index of the documentation is available at /llms.txt)
