'[[0, 1], [1, 0]]<ret>
1: [ [ 0, 1 ]
[ 1, 0 ] ]
ss
Store: var-sx<ret>
'[[0, (0, -1)], [(0, 1), 0]]
1: [ [ 0, (0, -1) ]
[ (0, 1), 0 ] ]
ss
Store: var-sy<ret>
'[[1, 0], [0, -1]]
ss
Store: var-sz<ret>
The prefix var- is supplied automatically by
Calc. You can back over it, if you don't want
to use a var- prefixed canonical name.
se:
se Edit: (default s2) var-Now type the name of the variable, e.g.,
sy,
and Calc will put you in the editing buffer that will
look as follows:
Editing sy. Press M-# M-# or C-c C-c to finish, M-# x to cancel. [ [0, (0, -1)], [(0, 1), 0] ]Now you can use normal Emacs editing to make changes.
sr:
sr
var-sx
1: [ [ 0, 1 ]
[ 1, 0 ] ]
(0,-1)
and store the results under the same names, so that
we'll get 3 new matrices: var-s1, var-s2 and
var-s3 that look as follows:
3: [ [ 0, (0, -1) ]
[ (0, -1), 0 ] ] ( var-s1 )
2: [ [ 0, -1 ]
[ 1, 0 ] ] ( var-s2 )
1: [ [ (0, -1), 0 ]
[ 0, (0, 1) ] ] ( var-s3 )
sr you
can do as follows:
'sx<ret>
1: sx
=
1: [ [ 0, 1 ]
[ 1, 0 ] ]
var-s1, var-s2 and
var-s3:
srs1<ret>srs1<ret>*
1: [ [ -1, 0 ]
[ 0, -1 ] ]
srs2<ret>srs2<ret>*
1: [ [ -1, 0 ]
[ 0, -1 ] ]
srs3<ret>srs3<ret>*
1: [ [ -1, 0 ]
[ 0, -1 ] ]
srs1<ret>srs2<ret>*srs3<ret>*
1: [ [ -1, 0 ]
[ 0, -1 ] ]
srs1<ret>srs2<ret>*
1: [ [ (0, -1), 0 ]
[ 0, (0, 1) ] ] ( = var-s3 )
srs2<ret>srs3<ret>*
1: [ [ 0, (0, -1) ]
[ (0, -1), 0 ] ] ( = var-s1 )
srs3<ret>srs1<ret>*
1: [ [ 0, -1 ]
[ 1, 0 ] ] ( = var-s2 )
What we have just demonstrated
is that there is an isomorphism between quaternions
and Pauli matrices, because that is what
,
,
and
are.
s_3, you
can extract any of its rows as follows:
sr
var-s3
1: [ [ (0, -1), 0 ]
[ 0, (0, 1) ] ]
vr
Row number: 1
1: [(0, -1), 0]
Calc asks about the row number in the minibuffer.
C-u1vr 1: (0, -1)where
C-u is Control-u followed by an index of
a row element you're after, followed by vr.
This time no questions are asked in the minibuffer.
C-u..vr command. For example
'[1,2,3,4,5,6,7,8] 1: [1, 2, 3, 4, 5, 6, 7, 8] '[2..6] 1: [2 .. 6] C-uvr 1: [2, 3, 4, 5, 6] 3<ret>C-uvr 1: 4As you see you can place an index for the
C-u switch
either before it, on the stack, or after it, when typing
the C-u..vr command.
'[[0, -1], [1, 0]]_1_2 1: -1
vc command:
sr
var-s3
1: [ [ (0, -1), 0 ]
[ 0, (0, 1) ] ]
vc
Column number: 2
1: [0, (0, 1)]
vc
Column number: 1
1: 0
vr followed by
C-u..vr you can use vr followed by vc
to the same effect.
vt:
'[[1,2,3][4,5,6]]
1: [ [ 1, 2, 3 ]
[ 4, 5, 6 ] ]
vt
1: [ [ 1, 4 ]
[ 2, 5 ]
[ 3, 6 ] ]