# Tag Info

8

JavaScript, 58 bytes a=>a.some((r,y)=>r.some((c,x)=>(r/(r=c)==a[x][x])/-y--<c)) Try it online! When c==0 r/(r=c) is NaN or Infinity; (r/(r=c)==a[x][x]) is false (r/(r=c)==a[x][x])/-y-- is 0 or NaN (r/(r=c)==a[x][x])/-y--<c is false When y==0 (cells on main diagonal) and c>=1 (r/(r=c)==a[x][x])/-y-- is NaN or Infinity (r/(r=c)==a[x][x])...

7

Jelly, 14 13 bytes ŒDµḢ=Ɲo@ƑḢ>FẠ Try it online! -1 because I actually thought to check if the input can contain negative integers ŒDµ Consider the diagonals of the input matrix. Ḣ Pop the main diagonal; Ɲ for each pair of its adjacent elements = are they equal? (Especially note ...

5

Rattle, 111 bytes |sI^>s[[PgI#1I#s2=#-#1[^0[^1g2[^0=q]][1g2[^0[^1=q]P=#4<s<=#3-sg0>I~<I~s_3P=#4+<s<=#3sg0>I~<I~<[^~=q]]]]g1]]=1 Try it Online! Needless to say, Rattle is not built to handle matrices and this approach is pretty brute-force. However, this code really shows off most of Rattle's features! Explanation | ...

4

Python 3, 69 bytes lambda m,n:re.sub(f"(.)({10**~-n}\\1)*(0%r|\$)"%{n},"",m)>"" import re Try it online! input is a flatened string of the matrix and its size output False for Jordan and True for not jordan Edit: as it wasn't specified when I post this answer, my solution only works for matrix with single digits elements How ...

2

R, 96 93 83 75 67 bytes function(m,k,j=1:k^2%%(k+1),x=m[!j])any(m[j>1],diff(diag(m))&x,x>1) Try it online! Takes input as matrix and it's size. Outputs inverted TRUE/FALSE values.

Only top voted, non community-wiki answers of a minimum length are eligible