⍝ Alternant:

    det ← -alt×                 ⍝ determinant

    det 2 2⍴2 3 4 5
¯2
    det 0⍪⍨ 2 2⍴2 3 4 5
¯2
    det 2 2⍴0 1,1 0
¯1
    det 1 1⍴3
3
    det 1 0⍴3
0
    det 0 1⍴3
1
    det 0 0⍴3
1
    hil ← {÷1+∘.+⍨(⍳⍵)-⎕io}     ⍝ Order-⍵ Hilbert matrix.

    ⎕pp←8
    det hil 5
3.7492951E¯12

    det 2 2⍴ 0 1, 1 0
¯1
    ,alt, 3 3⍴⎕A
┌───────────────┐
│AEIHFDBIHCGBFEC│
└───────────────┘

    3 3⍴ ⎕A
ABC
DEF
GHI
    ⊃{'(',⍺,'-',⍵,')'}alt{'(',⍺,'×',⍵,')'} 3 3⍴⎕A
((A×((E×I)-(H×F)))-((D×((B×I)-(H×C)))-(G×((B×F)-(E×C)))))

    +alt+ 2 2⍴⍳4
10
    +alt- 2 2⍴⍳4
¯2
    +alt× 4 4⍴ 1 1 1 1, 2 1 0 0, 3 0 1 0, 4 0 0 1       ⍝ permanent
10

⍝∇ alt

Back to: code

Back to: Workspaces