A SERVICE OF

logo

Page 11-54
such that x = Py, by using Q = xAx
T
= (Py)A (Py)
T
= y(P
T
AP)y
T
=
yDy
T
.
Function SYLVESTER
Function SYLVESTER takes as argument a symmetric square matrix A and returns
a vector containing the diagonal terms of a diagonal matrix D, and a matrix P,
so that P
T
AP = D. For example:
[[2,1,-1],[1,4,2],[-1,2,-1]] SYLVESTER
produces
2: [ 1/2 2/7 -23/7]
1: [[2 1 –1][0 7/2 5/2][0 0 1]]
Function GAUSS
Function GAUSS returns the diagonal representation of a quadratic form Q =
xAx
T
taking as arguments the quadratic form in stack level 2 and the vector
of variables in stack level 1. The result of this function call is the following:
An array of coefficients representing the diagonal terms of D (stack
level 4)
A matrix P such that A = P
T
DP (stack level 3)
The diagonalized quadratic form (stack level 2)
The list of variables (stack level 1)
For example:
'X^2+Y^2-Z^2+4*X*Y-16*X*Z' `
['X','Y','Z'] ` GUSS
returns
4: [1 –0.333 20.333]
3: [[1 2 –8][0 –3 16][0 0 1]]
2: ’61/3*Z^2+ -1/3*(16*Z+-3*Y)^2+(-8*z+2*Y+X)^2‘
1: [‘X’ ‘Y’ ‘Z’]
Linear Applications
The LINEAR APPLICATIONS menu is available through the „Ø.