  Given a matrix Lie algebra one can construct the 3-Lie algebra by means of
the trace of a matrix. In the present paper we show that this approach can be
extended to the infinite-dimensional Lie algebra of vector fields on a manifold
if instead of the trace of a matrix we consider a differential 1-form which
satisfies certain conditions. Then we show that the same approach can be
extended to matrix Lie superalgebras if instead of the trace of a matrix we
make use of the super trace of a matrix. It is proved that a graded triple
commutator of matrices constructed with the help of the graded commutator and
the super trace satisfies a graded ternary Filippov-Jacobi identity. In two
particular cases and we show that the Pauli and Dirac matrices generate the
matrix 3-Lie superalgebras, and we find the non-trivial graded triple
commutators of these algebras. We propose a Clifford algebra approach to 3-Lie
superalgebras induced by Lie superalgebras. We also discuss an application of
matrix 3-Lie superalgebras in BRST-formalism.
