Skip to main content
posted
Source Link
golf69
  • 2.1k
  • 1
  • 7
  • 10

Antisymmetry of a Matrix Posted:

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative.

The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here:

\$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\end{pmatrix}\$

\$\begin{pmatrix}11&12&13\\21&22&23\\31&32&33\end{pmatrix}\rightarrow\begin{pmatrix}11&21&31\\12&22&32\\13&23&33\end{pmatrix}\$

This matrix is antisymmetric because it equals its transpose when multiplied by -1:

\$\begin{pmatrix}0&2&-1\\-2&0&0\\1&0&0\end{pmatrix}\$

All antisymmetric matrices exhibit certain characteristics:

  • Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions.

  • Elements which lie on the main diagonal must equal zero because they do not move and consequently must be their own negatives, and zero is the only number which satisfies \$x=-x\$.

  • The sum of two antisymmetric matrices is also antisymmetric.

The Challenge

Given a square, non-empty matrix, check whether it is antisymmetric or not.

Rules

  • This is so the shortest program in bytes wins.

  • Input and output can assume whatever forms are most convenient.

  • Assume only valid input will be given.

Test CasesAntisymmetry of a Matrix

In: 1 1 1 1 1 1 1 1 1 Out: False In: 0 0 1 0 0 0 -1 0 0 Out: True In: 0 -2 2 0 Out: True 

Antisymmetry of a Matrix

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative.

The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here:

\$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\end{pmatrix}\$

\$\begin{pmatrix}11&12&13\\21&22&23\\31&32&33\end{pmatrix}\rightarrow\begin{pmatrix}11&21&31\\12&22&32\\13&23&33\end{pmatrix}\$

This matrix is antisymmetric because it equals its transpose when multiplied by -1:

\$\begin{pmatrix}0&2&-1\\-2&0&0\\1&0&0\end{pmatrix}\$

All antisymmetric matrices exhibit certain characteristics:

  • Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions.

  • Elements which lie on the main diagonal must equal zero because they do not move and consequently must be their own negatives, and zero is the only number which satisfies \$x=-x\$.

  • The sum of two antisymmetric matrices is also antisymmetric.

The Challenge

Given a square, non-empty matrix, check whether it is antisymmetric or not.

Rules

  • This is so the shortest program in bytes wins.

  • Input and output can assume whatever forms are most convenient.

  • Assume only valid input will be given.

Test Cases

In: 1 1 1 1 1 1 1 1 1 Out: False In: 0 0 1 0 0 0 -1 0 0 Out: True In: 0 -2 2 0 Out: True 
grammar; etc
Source Link
golf69
  • 2.1k
  • 1
  • 7
  • 10

Antisymmetry of a Matrix

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative.

The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here:

\$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\end{pmatrix}\$

\$\begin{pmatrix}11&12&13\\21&22&23\\31&32&33\end{pmatrix}\rightarrow\begin{pmatrix}11&21&31\\12&22&32\\13&23&33\end{pmatrix}\$

The followingThis matrix is antisymmetric, because it equals its transpose when multiplied by -1:

\$\begin{pmatrix}0&2&-1\\-2&0&0\\1&0&0\end{pmatrix}\$

All antisymmetric matrices exhibit certain characteristics. Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions. Additionally, elements which lie on the main diagonal must equal zero because they do not move and consequently must equal their negative, and zero is the only number which satisfies \$x=-x\$.:

  • Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions.

  • Elements which lie on the main diagonal must equal zero because they do not move and consequently must be their own negatives, and zero is the only number which satisfies \$x=-x\$.

  • The sum of two antisymmetric matrices is also antisymmetric.

The Challenge

Given a square, non-empty matrix, check whether it is antisymmetric or not.

Rules

  • This is so the shortest program in bytes wins.

  • Input and output can assume whatever forms are most convenient.

  • Assume only valid input will be given.

Test Cases

In: 1 1 1 1 1 1 1 1 1 Out: False In: 0 0 1 0 0 0 -1 0 0 Out: True In: 0 -2 2 0 Out: True 

Antisymmetry of a Matrix

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative.

The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here:

\$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\end{pmatrix}\$

\$\begin{pmatrix}11&12&13\\21&22&23\\31&32&33\end{pmatrix}\rightarrow\begin{pmatrix}11&21&31\\12&22&32\\13&23&33\end{pmatrix}\$

The following matrix is antisymmetric, because it equals its transpose when multiplied by -1:

\$\begin{pmatrix}0&2&-1\\-2&0&0\\1&0&0\end{pmatrix}\$

All antisymmetric matrices exhibit certain characteristics. Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions. Additionally, elements which lie on the main diagonal must equal zero because they do not move and consequently must equal their negative, and zero is the only number which satisfies \$x=-x\$.

The Challenge

Given a square, non-empty matrix, check whether it is antisymmetric or not.

Rules

  • This is so the shortest program in bytes wins.

  • Input and output can assume whatever forms are most convenient.

  • Assume only valid input will be given.

Test Cases

In: 1 1 1 1 1 1 1 1 1 Out: False In: 0 0 1 0 0 0 -1 0 0 Out: True In: 0 -2 2 0 Out: True 

Antisymmetry of a Matrix

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative.

The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here:

\$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\end{pmatrix}\$

\$\begin{pmatrix}11&12&13\\21&22&23\\31&32&33\end{pmatrix}\rightarrow\begin{pmatrix}11&21&31\\12&22&32\\13&23&33\end{pmatrix}\$

This matrix is antisymmetric because it equals its transpose when multiplied by -1:

\$\begin{pmatrix}0&2&-1\\-2&0&0\\1&0&0\end{pmatrix}\$

All antisymmetric matrices exhibit certain characteristics:

  • Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions.

  • Elements which lie on the main diagonal must equal zero because they do not move and consequently must be their own negatives, and zero is the only number which satisfies \$x=-x\$.

  • The sum of two antisymmetric matrices is also antisymmetric.

The Challenge

Given a square, non-empty matrix, check whether it is antisymmetric or not.

Rules

  • This is so the shortest program in bytes wins.

  • Input and output can assume whatever forms are most convenient.

  • Assume only valid input will be given.

Test Cases

In: 1 1 1 1 1 1 1 1 1 Out: False In: 0 0 1 0 0 0 -1 0 0 Out: True In: 0 -2 2 0 Out: True 
"```" was at the bottom
Source Link
golf69
  • 2.1k
  • 1
  • 7
  • 10

Antisymmetry of a Matrix

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative.

The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here:

\$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\end{pmatrix}\$

\$\begin{pmatrix}11&12&13\\21&22&23\\31&32&33\end{pmatrix}\rightarrow\begin{pmatrix}11&21&31\\12&22&32\\13&23&33\end{pmatrix}\$

The following matrix is antisymmetric, because it equals its transpose when multiplied by -1:

\$\begin{pmatrix}0&2&-1\\-2&0&0\\1&0&0\end{pmatrix}\$

All antisymmetric matrices exhibit certain characteristics. Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions. Additionally, elements which lie on the main diagonal must equal zero because they do not move and consequently must equal their negative, and zero is the only number which satisfies \$x=-x\$.

The Challenge

Given a square, non-empty matrix, check whether it is antisymmetric or not.

Rules

  • This is so the shortest program in bytes wins.

  • Input and output can assume whatever forms are most convenient.

  • Assume only valid input will be given.

Test Cases

In: 1 1 1 1 1 1 1 1 1 Out: False In: 0 0 1 0 0 0 -1 0 0 Out: True In: 0 -2 2 0 Out: True ``` 

Antisymmetry of a Matrix

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative.

The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here:

\$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\end{pmatrix}\$

\$\begin{pmatrix}11&12&13\\21&22&23\\31&32&33\end{pmatrix}\rightarrow\begin{pmatrix}11&21&31\\12&22&32\\13&23&33\end{pmatrix}\$

The following matrix is antisymmetric, because it equals its transpose when multiplied by -1:

\$\begin{pmatrix}0&2&-1\\-2&0&0\\1&0&0\end{pmatrix}\$

All antisymmetric matrices exhibit certain characteristics. Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions. Additionally, elements which lie on the main diagonal must equal zero because they do not move and consequently must equal their negative, and zero is the only number which satisfies \$x=-x\$.

The Challenge

Given a square, non-empty matrix, check whether it is antisymmetric or not.

Rules

  • This is so the shortest program in bytes wins.

  • Input and output can assume whatever forms are most convenient.

  • Assume only valid input will be given.

Test Cases

In: 1 1 1 1 1 1 1 1 1 Out: False In: 0 0 1 0 0 0 -1 0 0 Out: True In: 0 -2 2 0 Out: True ``` 

Antisymmetry of a Matrix

A matrix is antisymmetric, or skew-symmetric, if its transpose equals its negative.

The transpose of a matrix can be obtained by reflecting its elements across the main diagonal. Examples of transpositions can be seen here:

\$\begin{pmatrix}11&12&13\\21&22&23\end{pmatrix}\rightarrow\begin{pmatrix}11&21\\12&22\\13&23\end{pmatrix}\$

\$\begin{pmatrix}11&12&13\\21&22&23\\31&32&33\end{pmatrix}\rightarrow\begin{pmatrix}11&21&31\\12&22&32\\13&23&33\end{pmatrix}\$

The following matrix is antisymmetric, because it equals its transpose when multiplied by -1:

\$\begin{pmatrix}0&2&-1\\-2&0&0\\1&0&0\end{pmatrix}\$

All antisymmetric matrices exhibit certain characteristics. Antisymmetry can only be found on square matrices, because otherwise the matrix and its transpose would be of different dimensions. Additionally, elements which lie on the main diagonal must equal zero because they do not move and consequently must equal their negative, and zero is the only number which satisfies \$x=-x\$.

The Challenge

Given a square, non-empty matrix, check whether it is antisymmetric or not.

Rules

  • This is so the shortest program in bytes wins.

  • Input and output can assume whatever forms are most convenient.

  • Assume only valid input will be given.

Test Cases

In: 1 1 1 1 1 1 1 1 1 Out: False In: 0 0 1 0 0 0 -1 0 0 Out: True In: 0 -2 2 0 Out: True 
Source Link
golf69
  • 2.1k
  • 1
  • 7
  • 10
Loading