Check if all non-zero elements in a matrix are connected
Retina 0.8.2, 80 77 bytes

T`d`@1
1`1
_
+m`^((.)*)(1|_)( |.*¶(?&lt;-2&gt;.)*(?(2)(?!)))(?!\3)[1_]
$1_$4_
^\D+$


Try it online! Edit: Saved 1 byte thanks to @FryAmTheEggman. Explanation:

T`d`@1


Simplify to an array of @s and 1s.

1`1
_


Change one 1 to a _.

+m`^((.)*)(1|_)( |.*¶(?&lt;-2&gt;.)*(?(2)(?!)))(?!\3)[1_]
$1_$4_


Flood fill from the _ to adjacent 1s.

^\D+$


Test whether there are any 1s left.