{S,D}SYR (uplo, n, alpha, x, incx, a, lda) {C,Z}HER (uplo, n, alpha, x, incx, a, lda)
uplo character*1 On entry, specifies whether the upper- or lower- triangular part of the array A is referenced: If uplo = 'U' or 'u', the upper-triangular part of A is referenced. If uplo = 'L' or 'l', the lower-triangular part of A is referenced. On exit, uplo is unchanged. n integer*4 On entry, the order of the matrix A and the number of elements in vector x; n >= 0. On exit, n is unchanged. alpha real*4 | real*8 | complex*8 | complex*16 On entry, the scalar alpha*. On exit, alpha is unchanged. x real*4 | real*8 | complex*8 | complex*16 On entry, a one-dimensional array X of length at least (1+(n-1)*|incx|). Array X contains the vector x. On exit, x is unchanged. incx integer*4 On entry, the increment for the elements of X; incx must not equal zero. On exit, incx is unchanged. a real*4 | real*8 | complex*8 | complex*16 On entry, a two-dimensional array with dimensions lda by n. When uplo specifies the upper portion of the matrix, the leading n by n part of the array contains the upper-triangular part of the matrix, and the lower-triangular part of array A is not referenced. When uplo specifies the lower portion of the matrix, the leading n by n part of the array contains the lower-triangular part of the matrix, and the upper-triangular part of array A is not referenced. For CHER and ZHER routines, the imaginary parts of the diagonal elements are not accessed, need not be set, and are assumed to be zero. On exit, a is overwritten; the specified part of the array A is overwritten by the part of the updated matrix. lda integer*4 On entry, the first dimension of array A; lda >= MAX(1,n). On exit, lda is unchanged.
SSYR and DSYR perform the rank-one update of a real symmetric matrix: A = alpha*x*transp(x) + A CHER and ZHER perform the rank-one update of a complex Hermitian matrix: A = alpha*x*conjug_transp(x) + A alpha is a scalar, x is vector with n elements, and A is an n by n matrix in packed form. In the case of SSYR and DSYR, matrix A is a symmetric matrix and in the case of CHER and ZHER, matrix A is a Hermitian matrix.
REAL*4 A(50,20), X(20), alpha INCX = 1 LDA = 50 N = 20 alpha = 2.0 CALL SSYR('L',N,alpha,X,INCX,A,LDA) This FORTRAN code computes the rank-1 update of the matrix A, given by A = alpha*x*transp(x) + A. A is a real symmetric matrix with its lower-triangular part stored. COMPLEX*16 A(50,20), X(20), alpha INCX = 1 LDA = 50 N = 20 alpha = (2.0D0, 1.0D0) CALL ZHER('L',N,alpha,X,INCX,A,LDA) This FORTRAN code computes the rank-1 update of the matrix A, given by A = alpha*x*conjug_transp(x) + A. A is a complex Hermitian matrix with its lower-triangular part stored.