The mother of a four-year-old girl who was brutally killed by a man in an apparent random attack has touched many Taiwanese with her composure and loving message to her slain child, even as public outrage over the shocking incident threatens to boil over.

"Fortunately, I had held you tightly and told you I loved you every day," Ms Claire Wang, 36, posted on her Facebook account on Tuesday (March 29), the day after the tragedy, together with a photo of her holding her daughter in her arms and her husband by their side.

She gave the media permission to use the photograph, Central News Agency said.

Ms Wang appeared before dozens of TV cameras and journalists just hours after witnessing the killing of her child on Monday morning by a knife-wielding man on a Taipei street.

Although visibly traumatised and tearful, she spoke coherently about the incident and how she tried but failed to protect her child, who is identified in the media only by her surname Liu and family nickname of Little Light Bulb.

Related Story Taiwan beheading suspect beaten by angry mob

The suspect, 33-year-old Wang Ching-yu, grabbed the child from behind and decapitated her with a cleaver as she was riding a bicycle near Ms Wang.

He has a criminal record for drug offences and had undergone psychiatric treatment. He was beaten up by an angry mob on Tuesday while being transferred from a Taipei police station to the prosecutor's office for questioning.

But amid widespread calls for the killer to be executed immediately and for a mandatory death penalty for people convicted of killing children, Ms Wang has been one of the few to call for calm and reason at the same time she mourned her loss.

"I believe the suspects in these kinds of random killings lose their minds at that moment," Ms Wang told TV reporters at the police station on Monday.

"This is not a problem that can be solved by passing a law," she said. "I hope we can address the problem from its root, from the perspective of family and education, so that there will no longer be people like him (the perpetrator) in our society."

Ms Wang and her 44-year-old husband David Liu graduated from the University of Southern California, CNA reported. Mr Liu works in the high-tech sector, while Ms Wang is a stay-at-home mum.

They have three other children, a nine-year-old girl and two-year-old twins.

Ms Wang, who says she is a free-thinker, seemed determined to turn the tragedy of her daughter’s death into a lesson for the greater good.

"After the incident, many friends advised me to close my blog and Facebook page, but I really hope that her death can leave something behind, stir up some discussion, remind people of the importance of love, and call attention to the many issues in society," Ms Wang told reporters outside the funeral home on Tuesday.

She wrote on her Facebook post: "Please keep trusting people because society is still beautiful.

“Please give your dearest family members a hug. That would be the most comforting and caring thing you could do for us."

She has put the focus on the happiness of Little Light Bulb's short life.

"This morning, Little Light Bulb got up earlier than usual and told me happily that she was early enough to say 'bye bye' to her older sister as she left for school," Ms Wang wrote of the girl's last day alive in a widely circulated essay.

Later, Ms Wang wrote, the little girl sat on the bed as she nibbled on a fruit and looked out of the window. Asked what she was looking at, the girl told her mother: "I'm admiring the scenery and eating fruit.

"It's so beautiful. The world is so beautiful."

"Maybe it was her final retrospection of the world," wrote Ms Wang.

Her composure and magnanimity have been widely praised.

"The mother's calmness and perseverance were admirable and heartbreaking," Taipei Mayor Ko Wen-je said on Facebook, noting that public anger had erupted rapidly after the incident.

A Facebook user by the name of Candice Hsu posted on Ms Wang’s wall: “You have set a fine example for bereaved families.... I wish you well, you have been through so much.”

On Wednesday, the grieving mother announced, with her husband by her side, that the public was welcomed to visit her daughter's wake, but asked that mourners come "without hatred in your heart".

"I have never believed that hatred and recrimination can solve problems," Ms Wang said in a message printed on a card placed at the entrance to the wake.

"That's why we have always educated her (Little Light Bulb) in a loving, gentle way....She has accomplished her mission in this beautiful world and left without a care. I hope she can go on her way surrounded by love."