<?xml version="1.0" encoding="utf-8"?>
<FilingSummary xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Version>2.4.0.8</Version>
  <ProcessingTime />
  <ReportFormat>HtmlAndXml</ReportFormat>
  <ContextCount>230</ContextCount>
  <ElementCount>396</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>56</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0001000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/DocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <XmlFileName>R1.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1001000 - Statement - Consolidated Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ConsolidatedStatementsOfIncome</Role>
      <ShortName>Consolidated Statements of Income</ShortName>
      <XmlFileName>R2.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1002000 - Statement - Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ConsolidatedStatementsOfComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Comprehensive Income</ShortName>
      <XmlFileName>R3.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1002001 - Statement - Consolidated Statements of Comprehensive Income (Parentheticals)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ConsolidatedStatementsOfComprehensiveIncomeParentheticals</Role>
      <ShortName>Consolidated Statements of Comprehensive Income (Parentheticals)</ShortName>
      <XmlFileName>R4.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>true</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1003000 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <XmlFileName>R5.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1003501 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <XmlFileName>R6.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1004000 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <XmlFileName>R7.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>1005000 - Statement - Consolidated Statements of Changes in Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ConsolidatedStatementsOfChangesInStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity</ShortName>
      <XmlFileName>R8.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>1005501 - Statement - Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ConsolidatedStatementsOfChangesInStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</ShortName>
      <XmlFileName>R9.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>2101100 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/SummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <XmlFileName>R10.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>2102100 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/Acquisitions</Role>
      <ShortName>Acquisitions</ShortName>
      <XmlFileName>R11.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>2103100 - Disclosure - Customer Contracts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/CustomerContracts</Role>
      <ShortName>Customer Contracts</ShortName>
      <XmlFileName>R12.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>2104100 - Disclosure - Goodwill and Other Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/GoodwillAndOtherIntangibleAssets</Role>
      <ShortName>Goodwill and Other Intangible Assets</ShortName>
      <XmlFileName>R13.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>2105100 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <XmlFileName>R14.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>2106100 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <XmlFileName>R15.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>2107100 - Disclosure - Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/Contingencies</Role>
      <ShortName>Contingencies</ShortName>
      <XmlFileName>R16.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>2108100 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/Leases</Role>
      <ShortName>Leases</ShortName>
      <XmlFileName>R17.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>2109100 - Disclosure - Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockholdersEquity</Role>
      <ShortName>Stockholders' Equity</ShortName>
      <XmlFileName>R18.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>2110100 - Disclosure - Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockBasedCompensation</Role>
      <ShortName>Stock-Based Compensation</ShortName>
      <XmlFileName>R19.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>2111100 - Disclosure - Earnings per Common Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/EarningsPerCommonShare</Role>
      <ShortName>Earnings per Common Share</ShortName>
      <XmlFileName>R20.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>2112100 - Disclosure - Employee Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/EmployeeBenefitPlans</Role>
      <ShortName>Employee Benefit Plans</ShortName>
      <XmlFileName>R21.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>2113100 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/SegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <XmlFileName>R22.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>2115100 - Disclosure - Quarterly Financial Data (Unaudited) (Notes)</LongName>
      <ReportType>Notes</ReportType>
      <Role>http://www.matrixservice.com/role/QuarterlyFinancialDataUnauditedNotes</Role>
      <ShortName>Quarterly Financial Data (Unaudited) (Notes)</ShortName>
      <XmlFileName>R23.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>2116100 - Schedule - Valuation and Qualifying Accounts</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ValuationAndQualifyingAccounts</Role>
      <ShortName>Valuation and Qualifying Accounts</ShortName>
      <XmlFileName>R24.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>2201201 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/SummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <XmlFileName>R25.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>2302301 - Disclosure - Acquisitions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/AcquisitionsTables</Role>
      <ShortName>Acquisitions (Tables)</ShortName>
      <XmlFileName>R26.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>2303301 - Disclosure - Customer Contracts (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/CustomerContractsTables</Role>
      <ShortName>Customer Contracts (Tables)</ShortName>
      <XmlFileName>R27.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>2304301 - Disclosure - Goodwill and Other Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/GoodwillAndOtherIntangibleAssetsTables</Role>
      <ShortName>Goodwill and Other Intangible Assets (Tables)</ShortName>
      <XmlFileName>R28.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>2305301 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <XmlFileName>R29.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>2306301 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <XmlFileName>R30.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>2310301 - Disclosure - Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockBasedCompensationTables</Role>
      <ShortName>Stock-Based Compensation (Tables)</ShortName>
      <XmlFileName>R31.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>2311301 - Disclosure - Earnings per Common Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/EarningsPerCommonShareTables</Role>
      <ShortName>Earnings per Common Share (Tables)</ShortName>
      <XmlFileName>R32.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>2312301 - Disclosure - Employee Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/EmployeeBenefitPlansTables</Role>
      <ShortName>Employee Benefit Plans (Tables)</ShortName>
      <XmlFileName>R33.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>2313301 - Disclosure - Segment Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/SegmentInformationTables</Role>
      <ShortName>Segment Information (Tables)</ShortName>
      <XmlFileName>R34.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>2315301 - Disclosure - Quarterly Financial Data (Unaudited) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/QuarterlyFinancialDataUnauditedTables</Role>
      <ShortName>Quarterly Financial Data (Unaudited) (Tables)</ShortName>
      <XmlFileName>R35.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>2401402 - Disclosure - Summary of Significant Accounting Policies (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/SummaryOfSignificantAccountingPoliciesDetailsTextual</Role>
      <ShortName>Summary of Significant Accounting Policies (Details Textual)</ShortName>
      <XmlFileName>R36.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>2402402 - Disclosure - Acquisitions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/AcquisitionsDetails</Role>
      <ShortName>Acquisitions (Details)</ShortName>
      <XmlFileName>R37.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>2402403 - Disclosure - Acquisitions (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/AcquisitionsDetailsTextual</Role>
      <ShortName>Acquisitions (Details Textual)</ShortName>
      <XmlFileName>R38.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>2403402 - Disclosure - Customer Contracts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/CustomerContractsDetails</Role>
      <ShortName>Customer Contracts (Details)</ShortName>
      <XmlFileName>R39.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>2403403 - Disclosure - Customer Contracts (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/CustomerContractsDetailsTextual</Role>
      <ShortName>Customer Contracts (Details Textual)</ShortName>
      <XmlFileName>R40.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>2404402 - Disclosure - Goodwill and Other Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/GoodwillAndOtherIntangibleAssetsDetails</Role>
      <ShortName>Goodwill and Other Intangible Assets (Details)</ShortName>
      <XmlFileName>R41.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>2404403 - Disclosure - Goodwill and Other Intangible Assets (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/GoodwillAndOtherIntangibleAssetsDetails1</Role>
      <ShortName>Goodwill and Other Intangible Assets (Details 1)</ShortName>
      <XmlFileName>R42.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>2404404 - Disclosure - Goodwill and Other Intangible Assets (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/GoodwillAndOtherIntangibleAssetsDetailsTextual</Role>
      <ShortName>Goodwill and Other Intangible Assets (Details Textual)</ShortName>
      <XmlFileName>R43.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>2405402 - Disclosure - Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/DebtDetails</Role>
      <ShortName>Debt (Details)</ShortName>
      <XmlFileName>R44.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>2405403 - Disclosure - Debt (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/DebtDetailsTextual</Role>
      <ShortName>Debt (Details Textual)</ShortName>
      <XmlFileName>R45.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>2406402 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <XmlFileName>R46.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>2406403 - Disclosure - Income Taxes (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/IncomeTaxesDetails1</Role>
      <ShortName>Income Taxes (Details 1)</ShortName>
      <XmlFileName>R47.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>2406404 - Disclosure - Income Taxes (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/IncomeTaxesDetails2</Role>
      <ShortName>Income Taxes (Details 2)</ShortName>
      <XmlFileName>R48.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>2406405 - Disclosure - Income Taxes (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/IncomeTaxesDetails3</Role>
      <ShortName>Income Taxes (Details 3)</ShortName>
      <XmlFileName>R49.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>2406406 - Disclosure - Income Taxes (Details 4)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/IncomeTaxesDetails4</Role>
      <ShortName>Income Taxes (Details 4)</ShortName>
      <XmlFileName>R50.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>2406407 - Disclosure - Income Taxes (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/IncomeTaxesDetailsTextual</Role>
      <ShortName>Income Taxes (Details Textual)</ShortName>
      <XmlFileName>R51.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>2407401 - Disclosure - Contingencies (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ContingenciesDetailsTextual</Role>
      <ShortName>Contingencies (Details Textual)</ShortName>
      <XmlFileName>R52.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>2408401 - Disclosure - Leases (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/LeasesDetailsTextual</Role>
      <ShortName>Leases (Details Textual)</ShortName>
      <XmlFileName>R53.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>2409401 - Disclosure - Stockholders' Equity (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockholdersEquityDetailsTextual</Role>
      <ShortName>Stockholders' Equity (Details Textual)</ShortName>
      <XmlFileName>R54.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>2410402 - Disclosure - Stock-Based Compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockBasedCompensationDetails</Role>
      <ShortName>Stock-Based Compensation (Details)</ShortName>
      <XmlFileName>R55.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>2410403 - Disclosure - Stock-Based Compensation (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockBasedCompensationDetails1</Role>
      <ShortName>Stock-Based Compensation (Details 1)</ShortName>
      <XmlFileName>R56.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>2410404 - Disclosure - Stock-Based Compensation (Details 2)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockBasedCompensationDetails2</Role>
      <ShortName>Stock-Based Compensation (Details 2)</ShortName>
      <XmlFileName>R57.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>2410405 - Disclosure - Stock-Based Compensation (Details 3)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockBasedCompensationDetails3</Role>
      <ShortName>Stock-Based Compensation (Details 3)</ShortName>
      <XmlFileName>R58.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>2410406 - Disclosure - Stock-Based Compensation (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/StockBasedCompensationDetailsTextual</Role>
      <ShortName>Stock-Based Compensation (Details Textual)</ShortName>
      <XmlFileName>R59.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>2411402 - Disclosure - Earnings per Common Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/EarningsPerCommonShareDetails</Role>
      <ShortName>Earnings per Common Share (Details)</ShortName>
      <XmlFileName>R60.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>2411403 - Disclosure - Earnings per Common Share (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/EarningsPerCommonShareDetails1</Role>
      <ShortName>Earnings per Common Share (Details 1)</ShortName>
      <XmlFileName>R61.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>2412402 - Disclosure - Employee Benefit Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/EmployeeBenefitPlansDetails</Role>
      <ShortName>Employee Benefit Plans (Details)</ShortName>
      <XmlFileName>R62.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>2412403 - Disclosure - Employee Benefit Plans (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/EmployeeBenefitPlansDetailsTextual</Role>
      <ShortName>Employee Benefit Plans (Details Textual)</ShortName>
      <XmlFileName>R63.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>2413402 - Disclosure - Segment Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/SegmentInformationDetails</Role>
      <ShortName>Segment Information (Details)</ShortName>
      <XmlFileName>R64.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>2413403 - Disclosure - Segment Information (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/SegmentInformationDetails1</Role>
      <ShortName>Segment Information (Details 1)</ShortName>
      <XmlFileName>R65.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>2413404 - Disclosure - Segment Information (Details Textual)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/SegmentInformationDetailsTextual</Role>
      <ShortName>Segment Information (Details Textual)</ShortName>
      <XmlFileName>R66.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>2415402 - Disclosure - Quarterly Financial Data (Unaudited) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/QuarterlyFinancialDataUnauditedDetails</Role>
      <ShortName>Quarterly Financial Data (Unaudited) (Details)</ShortName>
      <XmlFileName>R67.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>2415403 - Disclosure - Quarterly Financial Data (Unaudited) (Details 1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/QuarterlyFinancialDataUnauditedDetails1</Role>
      <ShortName>Quarterly Financial Data (Unaudited) (Details 1)</ShortName>
      <XmlFileName>R68.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>2416401 - Schedule - Valuation and Qualifying Accounts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.matrixservice.com/role/ValuationAndQualifyingAccountsDetails</Role>
      <ShortName>Valuation and Qualifying Accounts (Details)</ShortName>
      <XmlFileName>R69.xml</XmlFileName>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Info">Element us-gaap_EntityWideRevenueMajorCustomerPercentage had a mix of decimals attribute values: 2 3.</Log>
    <Log type="Info">Element us-gaap_GoodwillPurchaseAccountingAdjustments had a mix of decimals attribute values: -5 -3.</Log>
    <Log type="Info">Element us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue had a mix of decimals attribute values: -5 -3.</Log>
    <Log type="Info">'Monetary' elements on report '2402403 - Disclosure - Acquisitions (Details Textual)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2404403 - Disclosure - Goodwill and Other Intangible Assets (Details 1)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2404404 - Disclosure - Goodwill and Other Intangible Assets (Details Textual)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2405403 - Disclosure - Debt (Details Textual)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2410406 - Disclosure - Stock-Based Compensation (Details Textual)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">'Monetary' elements on report '2412403 - Disclosure - Employee Benefit Plans (Details Textual)' had a mix of different decimal attribute values.</Log>
    <Log type="Info">Process Flow-Through: 1001000 - Statement - Consolidated Statements of Income</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Jun. 30, 2013'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Mar. 31, 2013'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Dec. 31, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Jun. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Mar. 31, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Dec. 31, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2011'</Log>
    <Log type="Info">Process Flow-Through: 1002000 - Statement - Consolidated Statements of Comprehensive Income</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Jun. 30, 2013'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Mar. 31, 2013'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Dec. 31, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Jun. 30, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Mar. 31, 2012'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Dec. 31, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column '3 Months Ended
Sep. 30, 2011'</Log>
    <Log type="Info">Process Flow-Through: 1002001 - Statement - Consolidated Statements of Comprehensive Income (Parentheticals)</Log>
    <Log type="Info">Process Flow-Through: 1003000 - Statement - Consolidated Balance Sheets</Log>
    <Log type="Info">	Process Flow-Through: Removing column 'Jun. 30, 2011'</Log>
    <Log type="Info">	Process Flow-Through: Removing column 'Jun. 30, 2010'</Log>
    <Log type="Info">Process Flow-Through: 1003501 - Statement - Consolidated Balance Sheets (Parenthetical)</Log>
    <Log type="Info">Process Flow-Through: 1004000 - Statement - Consolidated Statements of Cash Flows</Log>
    <Log type="Info">Process Flow-Through: 1005501 - Statement - Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</Log>
    <Log type="Info">	Process Flow-Through: Removing column '12 Months Ended
Jun. 30, 2010'</Log>
  </Logs>
  <InputFiles>
    <File>mtrx-20130906.xml</File>
    <File>mtrx-20130906.xsd</File>
    <File>mtrx-20130906_cal.xml</File>
    <File>mtrx-20130906_def.xml</File>
    <File>mtrx-20130906_lab.xml</File>
    <File>mtrx-20130906_pre.xml</File>
  </InputFiles>
  <SupplementalFiles />
  <BaseTaxonomies />
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
