SUBROUTINE UXTAXF(N,M,X,LDX,A,LDA,B,LDB) C This routine forms the matrix product B = X'AX, A being symmetric. C Inputs: C N Row dimension of X and order of A C M Column dimension of X and order of B C X X matrix C LDX Leading dimension of X in calling program C A A matrix (full storeage) C LDA Leading dimension of A in calling program C LDB Leading dimension of B in calling program C Outputs: C B B matrix, B = X'AX IMPLICIT REAL*8 (A-H,O-Z) DIMENSION X(LDX,M),A(LDA,N),B(LDB,M) DO 20 I=1,M DO 20 J=1,I AA=0.0D0 DO 10 K=1,N DO 10 L=1,N 10 AA=AA+X(K,I)*A(K,L)*X(L,J) B(I,J)=AA 20 B(J,I)=AA RETURN END