

-------------------------------------------------------------------------
|									|
|	     Symbolic Matrix/Vector Utilities v. 1.0			|
|	Written completely in System RPL for the HP48G/GX		|
|		        by Bill Weston					|
|									|
-------------------------------------------------------------------------

--------------------
| Vector Utilities |
--------------------

	Most of these vector utilities will work for vectors of any
dimension, unless otherwise specified.  All vector utilities evaluate
vectors symbolicly, in the form:

		{ v1 v2 ... vn }


VNRM:	Evaluates the norm of any size symbolic vector (ie, ||v||).

	Stack:	1:  { v1 v2 v3 }

	Result:	1:  'sqrt(v1^2 + v2^2 + v3^2)'


VDOT:	Evaluates the dot product of any two symbolic vectors of the same
	dimension.

	Stack:	2:  { u1 u2 u3 }
		1:  { v1 v2 v3 }

	Result: 1:  'u1*v1 + u2*v2 + u3*v3'


VCROSS:	Evaluates the cross product of two symbolic vectors in three-space.

	Stack:	2:  { u1 u2 u3 }
		1:  { v1 v2 v3 }

	Result: 1:  { 'u2*v3-u3*v2' '-(u1*v3-u3*v1)' 'u1*v2-u2*v1' }


PROJ:	Returns the projection vector of U along A.  Enter vector A on level
	two of the stack, and vector U on level one.

	Stack:	2:  { 0 1 0 }
		1:  { 3 5 4 }

	Result:	1:  { 0 5 0 }










VADD:	Vector addition for two symbolic vectors of the same dimension.
	Note:  The other operations ( - * / ) work normally for symbolic
	vectors.

	Stack:	2:  { u1 u2 u3 }
		1:  { v1 v2 v3 }

	Result: 1:  { 'u1+v1' 'u2+v2' 'u3+v3' }


PtN->Pl: Forms the equation for a plane from a point P one the
	plane and a vector N normal to the plane.

	Stack:	2:  { p1 p2 p3 }
		1:  { n1 n2 n3 }

	Result: 1:  'x*n1 + y*n2 + z*n3 - p1*n1 - p2*n2 - p3*n3 = 0'


Pt->Pl:	Forms the equation for the plane defined by three points.

	Stack:	3:  { 5 4 3 }
		2:  { 4 3 1 }
		1:  { 1 5 4 }

	Result:	1:  '-26 + x + 9*y - 5*z = 0'

NORM:	Normalizes the symbolic vector of any dimension on level one of the
	stack.

	Stack:	1:  { a b c }

	Result:	1:  { 'a/(a*b*c)' 'b/(a*b*c)' 'c/a*b*c' }


NCROSS:	Much like a cross product.  Given n vectors in dimension n+1,
	creates a vector orthogonal to all vectors given, if possible.  For
	two vectors in three-space, this is the cross product.

	Stack:	3:  { 0 4 0 0 }
		2:  { 5 0 0 0 }
		1:  { 0 0 0 3 }

	Result:	1:  { 0 0 -60 0 }
















--------------------
| Matrix Utilities |
--------------------

	These symbolic matrix utilites are intended to supplement the
utilities that are already out on the net.  They do not require MATH.LIB or
any other non-standard functions.  Like all other symbolic matrix utilites,
matrices are entered in the form:

		{{ a b c }
		 { d e f }
		 { g h i }}

Mtrn:	Transposes a symbolic matrix on level one of the stack.

	Stack:	1:  {{ a b c }
		     { d e f }
		     { g h i }}

	Result:	1:  {{ a d g }
		     { b e h }
		     { c f i }}


Mdet:	Evaluates the determinant of the symbolic matrix on level one.

	Stack:	1:  {{ a b }
		     { c d }}

	Result: 2:  'a*d-b*c'


MADJ:	Produces the adjoint matrix of the symbolic matrix on level one.



ADJ:	Produces the adjoint matrix of the numeric matrix on level one.


MCOF:	Evaluates the cofactor of the ij'th entry of a symbolic matrix.

	Stack:	3:  {{ a b c }
		     { d e f }
		     { g h i }}
		2:  1
		1:  3

	Result:	1:  'd*h-e*g'


COF:	Evaluates the cofactor of the ij'th entry of a numeric matrix.
	Works like MCOF, but uses standard numeric matrices.








MREF:	Puts a symbolic matrix into row-echelon-form (Gaussian elimination),
	as opposed to reduced-row-echelon-form (Gauss-Jordan elimination).

	Stack:	1:  {{ 1 2 3 }
		     { 4 5 6 }
		     { 7 8 9 }}

	Result:	1:  {{ 1 2 3 }
		     { 0 1 2 }
		     { 0 0 0 }}


MRCI:	Multiplies a row by a constant.  Works exactly like the HP RCI
	function, but for symbolic matrices.


MRCIJ:	Adds a multiple of one row to another.  Works exactly like the HP
	RCIJ function, but for symbolic matrices.


MRSWP:	Swaps two rows.  Works exactly like the HP RSWP function, but for
	symbolic matrices.


ADDR:	Adds (inserts) a row into a symbolic matrix.  Works exactly like the
	HP ROW+ function, but for symbolic matrices.


DELR:	Deletes the specified row from a symbolic matrix.

	Stack:	2:  {{ a b c }
		     { d e f }
		     { g h i }}
		1:  2

	Result:	1:  {{ a b c }
		     { g h i }}


ADDC:	Adds (inserts) a column into a symbolic matrix.  Works exactly like
	the HP COL+ function, but for sumbloic matrices.


DELR:	Deletes the specified column from a symbolic matrix.

	Stack:	2:  {{ a b c }
		     { d e f }
		     { g h i }}
		1:  2

	Result:	1:  {{ a c }
		     { d f }
		     { g i }}







--------------------
| Additional Notes |
--------------------

	The remaining five programs not listed are subprograms used by these
functions.  Some of these functions are dependent on others, so it is best
to check dependencies before removing or purging anything.

	Feel free to e-mail any suggestions, comments, or bugs.  I still
don't know if this works with the S/SX series.


-Bill Weston
 bweston@sun.lclark.edu
