J.K. Rowling used Kathleen as the middle initial in her professional name.
Rowling was born Joanne Rowling in 1965, and she did not originally have a middle name. Her publishers wanted her books to appeal to boys as well as girls, so they asked her to use initials rather than her first name. Rowling chose K in honor of her paternal grandmother, Kathleen Ada Bulgen.
The resulting name, J.K. Rowling, became the name printed on the Harry Potter books. The initial does not represent a middle name given to her at birth, which is a common misconception. Rowling has also been credited as Joanne Rowling in some legal and biographical contexts.
Her later crime novels were published under the separate pen name Robert Galbraith, keeping that identity distinct from the J.K. Rowling brand.