## 7.3 Complex matrix arithmetic operators

Stan supports all basic complex arithmetic operators using infix, prefix and postfix operations. This section lists the operations supported by Stan along with their argument and result types.

### 7.3.1 Negation prefix operators

complex_vector operator-(complex_vector x)
The negation of the vector x.
Available since 2.30

complex_row_vector operator-(complex_row_vector x)
The negation of the row vector x.
Available since 2.30

complex_matrix operator-(complex_matrix x)
The negation of the matrix x.
Available since 2.30

### 7.3.2 Infix complex_matrix operators

complex_vector operator+(complex_vector x, complex_vector y)
The sum of the vectors x and y.
Available since 2.30

complex_row_vector operator+(complex_row_vector x, complex_row_vector y)
The sum of the row vectors x and y.
Available since 2.30

complex_matrix operator+(complex_matrix x, complex_matrix y)
The sum of the matrices x and y
Available since 2.30

complex_vector operator-(complex_vector x, complex_vector y)
The difference between the vectors x and y.
Available since 2.30

complex_row_vector operator-(complex_row_vector x, complex_row_vector y)
The difference between the row vectors x and y
Available since 2.30

complex_matrix operator-(complex_matrix x, complex_matrix y)
The difference between the matrices x and y
Available since 2.30

complex_vector operator*(complex x, complex_vector y)
The product of the scalar x and vector y
Available since 2.30

complex_row_vector operator*(complex x, complex_row_vector y)
The product of the scalar x and the row vector y
Available since 2.30

complex_matrix operator*(complex x, complex_matrix y)
The product of the scalar x and the matrix y
Available since 2.30

complex_vector operator*(complex_vector x, complex y)
The product of the scalar y and vector x
Available since 2.30

complex_matrix operator*(complex_vector x, complex_row_vector y)
The product of the vector x and row vector y
Available since 2.30

complex_row_vector operator*(complex_row_vector x, complex y)
The product of the scalar y and row vector x
Available since 2.30

complex operator*(complex_row_vector x, complex_vector y)
The product of the row vector x and vector y
Available since 2.30

complex_row_vector operator*(complex_row_vector x, complex_matrix y)
The product of the row vector x and matrix y
Available since 2.30

complex_matrix operator*(complex_matrix x, complex y)
The product of the scalar y and matrix x
Available since 2.30

complex_vector operator*(complex_matrix x, complex_vector y)
The product of the matrix x and vector y
Available since 2.30

complex_matrix operator*(complex_matrix x, complex_matrix y)
The product of the matrices x and y
Available since 2.30

complex_vector operator+(complex_vector x, complex y)
The result of adding y to every entry in the vector x
Available since 2.30

complex_vector operator+(complex x, complex_vector y)
The result of adding x to every entry in the vector y
Available since 2.30

complex_row_vector operator+(complex_row_vector x, complex y)
The result of adding y to every entry in the row vector x
Available since 2.30

complex_row_vector operator+(complex x, complex_row_vector y)
The result of adding x to every entry in the row vector y
Available since 2.30

complex_matrix operator+(complex_matrix x, complex y)
The result of adding y to every entry in the matrix x
Available since 2.30

complex_matrix operator+(complex x, complex_matrix y)
The result of adding x to every entry in the matrix y
Available since 2.30

complex_vector operator-(complex_vector x, complex y)
The result of subtracting y from every entry in the vector x
Available since 2.30

complex_vector operator-(complex x, complex_vector y)
The result of adding x to every entry in the negation of the vector y
Available since 2.30

complex_row_vector operator-(complex_row_vector x, complex y)
The result of subtracting y from every entry in the row vector x
Available since 2.30

complex_row_vector operator-(complex x, complex_row_vector y)
The result of adding x to every entry in the negation of the row vector y
Available since 2.30

complex_matrix operator-(complex_matrix x, complex y)
The result of subtracting y from every entry in the matrix x
Available since 2.30

complex_matrix operator-(complex x, complex_matrix y)
The result of adding x to every entry in negation of the matrix y
Available since 2.30

complex_vector operator/(complex_vector x, complex y)
The result of dividing each entry in the vector x by y
Available since 2.30

complex_row_vector operator/(complex_row_vector x, complex y)
The result of dividing each entry in the row vector x by y
Available since 2.30

complex_matrix operator/(complex_matrix x, complex y)
The result of dividing each entry in the matrix x by y
Available since 2.30