From APL Wiki
Jump to navigation Jump to search

Determinant (.) is a primitive dyadic operator that takes two dyadic functions for operands and produces a monadic function. Much like Inner Product for matrix products, it generalizes the matrix determinant, so that -.× computes the determinant and +.× the permanent. Determinant has been implemented in SHARP APL, NARS2000, and J; however, the J definition differs by factoring out a reduction from the definition, so that -/ .* is the matrix determinant.

Unlike the inner product operator, which performs arithmetic operations on square matrices of side length given arithmetic operands, definitions of the determinant use a super-polynomial number of evaluations, for example in SHARP APL's definition. Computing the permanent in particular is not believed to be possible in polynomial time, which would rule out a polynomial-time definition for any generalization of it. The specific determinant function -.× can be computed much faster (for example by LU decomposition in ), and is always handled specially for performance. Other combinations of operands may also have optimized implementations.

The determinant operator was described by Ken Iverson in "Determinant-Like Functions Produced by the Dot Operator"[1] and also implemented in SHARP APL[2] in 1982. It also appears in Iverson's later publications Rationalized APL and A Dictionary of APL.



  1. Ken Iverson. SATN-42: Determinant-Like Functions Produced by the Dot Operator. 1982-04-01.
  2. IPSA Newsletter July/August 1982 (pdf)
APL built-ins [edit]
Primitives (Timeline) Functions
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentityStopSelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndexCartesian ProductSort
Selector Index generatorGradeIndex OfInterval IndexIndicesDealPrefix and suffix vectors
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-BeamSpawnFunction axis
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)
Quad names Index originComparison toleranceMigration levelAtomic vector