run head against a brick wall

run (one's) head against a brick wall

To attempt, continually and fruitlessly, to accomplish some task or achieve some goal that is or seems ultimately hopeless. I feel like I've been running 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 running your head against a brick wall trying to convince everyone.
See also: brick, head, run, wall
Farlex Dictionary of Idioms.

run one's head against a brick wall

Fig. to be frustrated by coming up against an insurmountable obstacle. There is no point in running your head against a brick wall. If you can't succeed in this case, don't even try. I have been running my head against a brick wall about this problem long enough.
See also: brick, head, run, wall
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs.

run one's head against (into) a brick/stone wall, to

To make vain efforts against insurmountable difficulties. This expression, with its vivid image of futility, dates from the sixteenth century, when John Lyly (or some other author) wrote, “Thou shalt . . . have thy head runne against a stone wall” (1589). Other equally hard objects, like doors, were cited in similar fashion. By 1887, however, it was “If we run our heads against walls we’re safe to hurt ourselves” (M. Sergeant, Jacobi’s Wife, 1.1).
See also: brick, head, run, stone
The Dictionary of Clichés by Christine Ammer
See also:
  • run (one's) head against a brick wall
  • beat (one's) head against a stone wall
  • knock (one's) head against a (brick) wall
  • knock (one's) head against a/the wall
  • knock head against a brick 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 hitting (one's) head against a (brick) wall