This is of course an infamous story in folk-history. Among the Pythagoreans, circa 500 BC, it became known that the square root of 2 could not be a rational number (or rather that 2 lengths could be incommensurable). This was completely against their beliefs, and dogmatic as they were, they made it a secret and potentially even murdered Hippasus for discovering or popularizing it.
This is often told as a fact by math profs or teachers, features in prominent numberphile videos and so on. But I've made the experience that history of math told by math profs is often not very reliable. Wikipedia says it happened "according to legend", none of the sources cited in support is very illuminating
What do historians say?
Did Pythagoras really kill his student because he proved the existence of irrational numbers? by u/Iphikrates touches on this myth and some of its origins