Skip to main content
Commonmark migration
Source Link

#TI-Basic (TI-83 series), 28 27 28 bytes (62 characters)

TI-Basic (TI-83 series), 28 27 28 bytes (62 characters)

:Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,L₁,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix [A], stores its first row (to be discarded) in L₁ and its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1-row matrix, ᶫX is set to {0} and then doesn't get changed when we try to look at the nonexistent second row of the matrix.


-1 byte thanks to Scott Milner

+1 byte to fix dimension error for 1-row matrices. Turns out the Matr►list( command complains if you try to extract the second row from a matrix with only one row; however, if you try to extract the first and second row both from the matrix, it will fail silently.

#TI-Basic (TI-83 series), 28 27 28 bytes (62 characters)

:Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,L₁,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix [A], stores its first row (to be discarded) in L₁ and its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1-row matrix, ᶫX is set to {0} and then doesn't get changed when we try to look at the nonexistent second row of the matrix.


-1 byte thanks to Scott Milner

+1 byte to fix dimension error for 1-row matrices. Turns out the Matr►list( command complains if you try to extract the second row from a matrix with only one row; however, if you try to extract the first and second row both from the matrix, it will fail silently.

TI-Basic (TI-83 series), 28 27 28 bytes (62 characters)

:Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,L₁,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix [A], stores its first row (to be discarded) in L₁ and its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1-row matrix, ᶫX is set to {0} and then doesn't get changed when we try to look at the nonexistent second row of the matrix.


-1 byte thanks to Scott Milner

+1 byte to fix dimension error for 1-row matrices. Turns out the Matr►list( command complains if you try to extract the second row from a matrix with only one row; however, if you try to extract the first and second row both from the matrix, it will fail silently.

fixed ERR:INVALID DIM problem
Source Link
Misha Lavrov
  • 5.3k
  • 14
  • 27

#TI-Basic (TI-83 series), 28 2727 28 bytes (6162 characters)

:Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,2L₁,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix [A], and stores its first row (to be discarded) in L₁ and its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1 by 1-row matrix, ᶫX will start atis set to {0}{0} and then notdoesn't get changed when we try to look at the nonexistent second row of the matrix.


-1 byte thanks to Scott Milner

+1 byte to fix dimension error for 1-row matrices. Turns out the Matr►list( command complains if you try to extract the second row from a matrix with only one row; however, if you try to extract the first and second row both from the matrix, it will fail silently.

#TI-Basic (TI-83 series), 28 27 bytes (61 characters)

:Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,2,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix [A], and stores its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1 by 1 matrix, ᶫX will start at {0} and then not get changed when we try to look at the nonexistent second row of the matrix.


-1 byte thanks to Scott Milner

#TI-Basic (TI-83 series), 28 27 28 bytes (62 characters)

:Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,L₁,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix [A], stores its first row (to be discarded) in L₁ and its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1-row matrix, ᶫX is set to {0} and then doesn't get changed when we try to look at the nonexistent second row of the matrix.


-1 byte thanks to Scott Milner

+1 byte to fix dimension error for 1-row matrices. Turns out the Matr►list( command complains if you try to extract the second row from a matrix with only one row; however, if you try to extract the first and second row both from the matrix, it will fail silently.

added 47 characters in body
Source Link
Misha Lavrov
  • 5.3k
  • 14
  • 27

#TI-Basic (TI-83 series), 2828 27 bytes (5861 characters)

:Ans→[A]Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,2,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix (passed in via Ans[A]), and stores its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1 by 1 matrix, ᶫX will start at {0} and then not get changed when we try to look at the nonexistent second row of the matrix.


-1 byte thanks to Scott Milner

#TI-Basic (TI-83 series), 28 bytes (58 characters)

:Ans→[A] :{0→X :Matr►list(ref([A])ᵀ,2,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix (passed in via Ans), and stores its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1 by 1 matrix, ᶫX will start at {0} and then not get changed when we try to look at the nonexistent second row of the matrix.

#TI-Basic (TI-83 series), 28 27 bytes (61 characters)

:Prompt [A] :{0→X :Matr►list(ref([A])ᵀ,2,X :not(max(abs(ᶫX 

Computes the row-echelon form of the matrix [A], and stores its second row in ᶫX. Then max(abs(ᶫX will be zero if ᶫX consists only of zeroes, and a positive value otherwise, which not( changes to 1 if the matrix is rank one, 0 otherwise.

For a 1 by 1 matrix, ᶫX will start at {0} and then not get changed when we try to look at the nonexistent second row of the matrix.


-1 byte thanks to Scott Milner

`ref(` is not reduced, and both that and `Matr►list` are each two byte tokens.
Source Link
Loading
better way to deal with 1 by 1 matrices
Source Link
Misha Lavrov
  • 5.3k
  • 14
  • 27
Loading
fixed the 1 by 1 case
Source Link
Misha Lavrov
  • 5.3k
  • 14
  • 27
Loading
Source Link
Misha Lavrov
  • 5.3k
  • 14
  • 27
Loading