What's the word for being able to "pull something out of a function"?

"Linearity" is a notion for vector spaces.

The term you are looking for is called "homomorphism".

A homomorphism is a map between two algebraic structures of the same type (that is of the same name), that preserves the operations of the structures.

One says often that the homomorphism $f$ preserves the operation $\odot$ or is compatible with the operation.


I see this as a special case of what category theory calls commuting.

In your first example, you start with the two numbers $5$ and $7$. If you first multiply them both by $x$, then add them together, you get the same result as you do if you first add them, then multiply the result with $x$. This isn't difficult to describe with a square-shaped commutative diagram. The same goes for your $\odot$ example.

If you have a linear map, applying that map commutes with multiplication by a constant in this category theoretical sense. This aligns with the matrix fact that the identity matrix and multiples thereof commute with other (square) matrices.

For your preimage example, anyone familiar with category theory would know exactly what you mean if you say that unions commute with taking preimages of a function.


This is also called distributivity. Your first example, $$ 5x+7x = x(5+7) $$ is a statement of distributivity of multiplication over addition (and assumes commutative multiplication, otherwise the right-hand side would be "$(5+7)x$").

In your terminal example, you could state "$f$ distributes over $\odot$".