knock head against a brick wall

knock (one's) head against a (brick) wall

To attempt continuously and fruitlessly to accomplish some task or achieve some goal that is or seems ultimately hopeless. I feel like I've been knocking my head against a brick wall trying to understand this math equation. Some people are never going to agree with you on this, so it's no use knocking your head against a wall trying to convince everyone.
See also: head, knock, wall
Farlex Dictionary of Idioms.

knock one's head (up) against a brick wall

Fig. to be totally frustrated. Trying to get a raise around here is like knocking your head up against a brick wall. No need to knock your head against a brick wall over this problem.
See also: brick, head, knock, wall
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs.
See also:
  • knock (one's) head against a (brick) wall
  • knock (one's) head against a/the wall
  • beat (one's) head against a stone wall
  • bang (one's) head against a brick wall
  • bang (one's) head against a wall
  • bang your head against a brick wall
  • be banging (one's) head against a brick wall
  • be banging your head against a brick wall
  • be banging, etc. your head against a brick wall
  • be hitting (one's) head against a (brick) wall