The Justice Department is investigating whether high frequency trading violates insider trading laws, Attorney General Eric Holder said Friday.

"This practice, which consists of financial brokers and trading firms using advanced computer algorithms and ultra-high speed data networks to execute trades, has rightly received scrutiny from regulators," Holder said at a House hearing. "The department is committed to ensuring the integrity of our financial markets - and we are determined to follow this investigation wherever the facts and the law may lead."

It is the first public confirmation of the investigation.

High frequency trading has been in the news a lot this week. Author Michael Lewis charged in his new book "Flash Boys" that firms engaged in high frequency trading are gaming the system and unfairly making profits at the expense of everyone else who invests in the U.S. stock market

"The United States stock market, the most iconic market in global capitalism, is rigged ... by a combination of the stock exchanges, the big Wall Street banks and high-frequency traders," he said in an interview with CBS' "60 Minutes."

Related: Wall Street responds to 'Flash Boys'

Lewis' criticisms have been echoed by some others, including Charles Schwab, the founder of the discount trading firm, who called high frequency trading a "growing cancer" that needs to be outlawed.

But high frequency trading also has its defenders, including Arthur Levitt, the former head of the Securities and Exchange Commission. "I'm not persuaded the average investor is not getting a price that is just as good as a high-frequency trader," he said this week. Levitt now serves as an adviser to one of the biggest high-frequency trading firms, KCG Holdings.