---
title: "vSzaxpy(_:_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vszaxpy(_:_:_:_:_:)"
---

# vSzaxpy(_:_:_:_:_:)

Multiplies a vector by a scalar, adds it to a second vector, and stores the result in a third vector.

## Declaration

```swift
func vSzaxpy(_ n: Int32, _ alpha: Float, _ x: UnsafePointer<vFloat>, _ y: UnsafePointer<vFloat>, _ z: UnsafeMutablePointer<vFloat>)
```

## Parameters

- `n`: Number of elements in vectors x, y, and z; must be a multiple of 4.
- `alpha`: Multiplier.
- `x`: Source vector with n elements of type float.
- `y`: Source vector with n elements of type float.
- `z`: Source vector with n elements of type float.

## Discussion

Discussion Each element of vector x is multiplied by alpha, then the corresponding element of yY is added. Results are stored in the corresponding elements of z.

## See Also

### Vector-Scalar Linear Algebra Functions (from vectorOps.h)

- [vIsamax(_:_:)](accelerate/visamax(_:_:).md)
- [vIsamin(_:_:)](accelerate/visamin(_:_:).md)
- [vIsmax(_:_:)](accelerate/vismax(_:_:).md)
- [vIsmin(_:_:)](accelerate/vismin(_:_:).md)
- [vSasum(_:_:)](accelerate/vsasum(_:_:).md)
- [vSsum(_:_:)](accelerate/vssum(_:_:).md)
- [vSaxpy(_:_:_:_:)](accelerate/vsaxpy(_:_:_:_:).md)
- [vSnaxpy(_:_:_:_:_:)](accelerate/vsnaxpy(_:_:_:_:_:).md)
- [vScopy(_:_:_:)](accelerate/vscopy(_:_:_:).md)
- [vSdot(_:_:_:)](accelerate/vsdot(_:_:_:).md)
- [vSndot(_:_:_:_:_:_:)](accelerate/vsndot(_:_:_:_:_:_:).md)
- [vSnrm2(_:_:)](accelerate/vsnrm2(_:_:).md)
- [vSnorm2(_:_:)](accelerate/vsnorm2(_:_:).md)
- [vSrot(_:_:_:_:_:)](accelerate/vsrot(_:_:_:_:_:).md)
- [vSscal(_:_:_:)](accelerate/vsscal(_:_:_:).md)
