Source: https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-types/vector-type/ Documentation version: v5.3.2 # Vector types The vector type is a data type used to describe vector data, which is defined by a fixed number of dimensions and a specific data type of the coordinates. ## Syntax diagramsource vector ```` vector ::= 'VECTOR' '<' dimension ',' coordinate_type '>' ```` Each vector type is declared with the keyword `VECTOR` followed by the number of dimensions and the data type of the coordinates. The number of dimensions must be within the range of 1 to 2,147,483,647. As for the data type of the coordinates, only `FLOAT` is supported currently. ## Declaration example ```` ''' CREATE GRAPH TYPE IF NOT EXISTS person AS { NODE Person ( { id INT64 PRIMARY KEY, is_adult BOOL DEFAULT TRUE, slogan VECTOR<3, FLOAT> DEFAULT NULL, selfintro VECTOR<10, FLOAT> NULL } ) } ''' ```` Note 1. Only the `NULL` value can be assigned as the default value of a `VECTOR` property. 2. `VECTOR` properties CANNOT be used to form the primary key of a node type or the multi-edge key of an edge type. For more information, see [primary_key_list](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/ddl/graph-type/create/#primary_key_list) and [multi_edge_key_list](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/ddl/graph-type/create/#multiedge_key_list). ## Supported arithmetic operations The following table lists the arithmetic operations that can be performed on vector type values. For detailed example, see [Arithmetic operations for vectors](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/fe/functions/vector/#arithmetic_operations_for_vectors). | Operand 1 | Operator | Operand 2 | Result | vector | `+` or `-` | number or vector with the same dimension | vector | vector | `*` or `/` | number | vector ## More information - [Vector literals](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/fe/literals/#vector_literals) - [Vector functions](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/fe/functions/vector/)