*, assuming that
there are two arrays of matching length on the stack:
'[1,2,3] 1: [1, 2, 3] '[4,5,6] 1: [4, 5, 6] * 1: 32 '1 * 4 + 5 * 2 + 6 * 3 1: 32A cross product makes sense for vectors in a 3D space only, because a cross product is really an archaic notation for a skew-symmetric tensor product, the so called external product between two 1-forms
VC:
'[1,2,3] 1: [1, 2, 3] '[4,5,6] 1: [4, 5, 6] VC 1: [-3, 6, -3]or, if you prefer to use an algebraic notation, by
cross:
'cross([1,2,3],[4,5,6]) 1: [-3, 6, -3]
abs,
key-binding A.
rnorm,
key-binding vn.
cnorm,
key-binding VN.
'[[1,(0,2),(3,-2)],[(-1,-2),2,(0,-1)],[(1,1),(2,3),3]]
1: [ [ 1, (0, 2), (3, -2) ]
[ (-1, -2), 2, (0, -1) ]
[ (1, 1), (2, 3), 3 ] ]
VJ
1: [ [ 1, (-1, 2), (1, -1) ]
[ (0, -2), 2, (2, -3) ]
[ (3, 2), (0, 1), 3 ] ]
Conjugate transpose is sometimes also called
Hermitian conjugate. Matrices that are invariant
with respect to Hermitian conjugation are called
Hermitian matrices. The
sr var-sx
1: [ [ 0, (0, -1) ]
[ (0, 1), 0 ] ]
VJ
1: [ [ 0, (0, -1) ]
[ (0, 1), 0 ] ]
Hermitian matrices, and, more broadly, Hermitian operators
are identified with measurables of quantum mechanics.
The VJ key-binding corresponds to function
ctrn.
vt:
'[[1,(0,2),(3,-2)],[(-1,-2),2,(0,-1)],[(1,1),(2,3),3]]
1: [ [ 1, (0, 2), (3, -2) ]
[ (-1, -2), 2, (0, -1) ]
[ (1, 1), (2, 3), 3 ] ]
vt
1: [ [ 1, (-1, -2), (1, 1) ]
[ (0, 2), 2, (2, 3) ]
[ (3, -2), (0, -1), 3 ] ]
The vt key-binding corresponds to function trn.
'[[1,2][3,4]]
1: [ [ 1, 2 ]
[ 3, 4 ] ]
VD
1: -2
Let us try a larger
'[[1,4,3][9,5,6][7,8,2]]
1: [ [ 1, 4, 3 ]
[ 9, 5, 6 ]
[ 7, 8, 2 ] ]
VD
169
sr var-sx
1: [ [ 0, (0, -1) ]
[ (0, 1), 0 ] ]
'[[x,0][0,x]]
1: [ [ x, 0 ]
[ 0, x ] ]
-
1: [ [ -x, (0, -1) ]
[ (0, 1), -x ] ]
VD
1: x^2 - 1
`, Calc will put you
right into the editor, where you can edit the top
of the stack value. The editing window will look as
follows:
Calc Edit Mode. Press M-# M-# or C-c C-c to finish, M-# x to cancel. x^2 - 1Replace
x^2 - 1 with x^2 - 1 = 0:
Calc Edit Mode. Press M-# M-# or C-c C-c to finish, M-# x to cancel. x^2 - 1 = 0and press
C-c C-c. Once you get out of the
editing window, press HaS to find all
solutions to this equation:
1: x^2 - 1 = 0 HaS Variable to solve for: x<ret> x = s1The message
Variable to solve for... will
appear in the minibuffer.
s1 is a symbol that represents independent
arbitrary signs, i.e., a + or a -. So,
the answer really is:
'[[1,4,3][9,5,6][7,8,2]]
1: [ [ 1, 4, 3 ]
[ 9, 5, 6 ]
[ 7, 8, 2 ] ]
Let us duplicate this item on the stack, simply by
pressing return:
<ret>
2: [ [ 1, 4, 3 ]
[ 9, 5, 6 ]
[ 7, 8, 2 ] ]
1: [ [ 1, 4, 3 ]
[ 9, 5, 6 ]
[ 7, 8, 2 ] ]
Now let us invert the last matrix on the stack. This
is accomplished by typing &:
&
1: [ [ -0.224852071006, 0.094674556213, 0.0532544378698 ]
[ 0.14201183432, -0.112426035503, 0.12426035503 ]
[ 0.218934911243, 0.118343195266, -0.183431952663 ] ]
Is this indeed the inverse? That's easy to check. Simply
multiply the last two matrices on the stack:
*
1: [ [ 1., -1e-12, 1e-12 ]
[ 1e-11, 0.999999999998, 0. ]
[ 6e-12, -1e-12, 1. ] ]
This is almost an identity matrix. With the
accuracy of 10-11.
VT key-binding evaluates a trace of a square
matrix. For example:
'[[1,4,3][9,5,6][7,8,2]]
1: [ [ 1, 4, 3 ]
[ 9, 5, 6 ]
[ 7, 8, 2 ] ]
VT
1: 8
'1+5+2
1: 8
'[[1,4,3][9,5,6][7,8,2]]
1: [ [ 1, 4, 3 ]
[ 9, 5, 6 ]
[ 7, 8, 2 ] ]
VL
1: [ [ 0, 0, 1 ] [ [ 1, 0, 0 ] [ [ 9, 5, 6 ]
[ [ 1, 0, 0 ] , [ 0.777777777778, 1, 0 ] , [ 0, 4.11111111111, -2.66666666667 ] ]
[ 0, 1, 0 ] ] [ 0.111111111111, 0.837837837838, 1 ] ] [ 0, 0, 4.56756756757 ] ]
The answer is a vector of 3 matrices. The first one is called a permutation matrix,
the second is called the L matrix and the last one is called the U matrix.
The L matrix has zeros above the diagonal, and the U matrix has zeros
below the diagonal.
<ret>.
vr:
vr
Row number: 1
1: [ [ 0, 0, 1 ]
[ 1, 0, 0 ]
[ 0, 1, 0 ] ]
<tab>, duplicate the last item
on the stack by pressing <ret>, and extract a second
matrix from the vector
<tab>
<ret>
vr
Row number: 2
1: [ [ 1, 0, 0 ]
[ 0.777777777778, 1, 0 ]
[ 0.111111111111, 0.837837837838, 1 ] ]
<tab>, forgo duplication
this time, and extract the third matrix:
vr
Row number: 3
1: [ [ 9, 5, 6 ]
[ 0, 4.11111111111, -2.66666666667 ]
[ 0, 0, 4.56756756757 ] ]
* twice, to multiply the three
matrices by each other:
**
1: [ [ 0.999999999999, 4., 3. ]
[ 9., 5., 6. ]
[ 7., 8., 2. ] ]