# VecDot

Computes the vector dot product.

### Synopsis

    #include "petscvec.h"
    int VecDot(Vec x,Vec y,PetscScalar *val)

Collective on Vec

### Input Parameters

x, y -the vectors

### Output Parameter

alpha -the dot product

### Performance Issues

| per | - processor memory bandwidth
| interprocessor latency | - - work load inbalance that causes certain processes to arrive much earlier than others

### Notes for Users of Complex Numbers

For complex vectors, VecDot() computes

        val = (x,y) = y^H x,

where y^H denotes the conjugate transpose of y.

Use VecTDot() for the indefinite form

        val = (x,y) = y^T x,

where y^T denotes the transpose of y.

### See Also

VecMDot(), VecTDot(), VecNorm(), VecDotBegin(), VecDotEnd()

Level:intermediate
Location: src/vec/interface/vector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/vec/examples/tutorials/ex1.c.html
src/vec/examples/tutorials/ex1e.c.html
src/vec/examples/tutorials/ex1f.F.html
src/vec/examples/tutorials/ex1f90.F.html