Flying a flag at half mast symbolizes grief, mourning and respect. In the event of a national disaster or death of specific government office bearers, the flag is hoisted half mast for a period of time.
On Peace Officer's Memorial Day marked on May 15th, the flag flies half mast from sunrise to sunset. On Patriot Day, commemorated on September 11th, and National Pearl Harbor Remembrance on December 7th, the flag also flies half mast from sunrise to sunset.
In the event of the death of a sitting or former president, the flag flies half mast for 30 days. Following the death of a sitting Vice President, the Chief Justice or the Speaker of the House of Representatives, the flag flies half mast for 10 days.
The U.S. Flag Code provides for the President, state governors and the Mayor of Washington, D.C., to order flags to fly at half mast. For example, on October 1, 2015, President Obama ordered the flags to be flown half mast in honor of gun violence victims in Roseburg, Oregon.