<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2021 Workiva-->
<!--r:d1d1d387-18b1-4aea-a1e9-9f79d1cfc3cf,g:3ba3f9e3-34a7-493b-84d1-262ffe7f296e-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CoverPage" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CoverPage"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CoverPage" xlink:type="extended" id="i9228bcc696174e63a41ffe2ecbcbfee8_CoverPage"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CondensedConsolidatedStatementsofIncome"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofIncome" xlink:type="extended" id="i893779ffdaf34664877b74074bd59758_CondensedConsolidatedStatementsofIncome"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CondensedConsolidatedStatementsofComprehensiveIncome"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncome" xlink:type="extended" id="i25843836d4a743e0a5c7b597c1da6fa1_CondensedConsolidatedStatementsofComprehensiveIncome">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_e036af61-3a7c-4684-933b-9bdb14f2da06" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_30415ef3-8ec7-42b7-a311-0fd25b6ddf86" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_e036af61-3a7c-4684-933b-9bdb14f2da06" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_30415ef3-8ec7-42b7-a311-0fd25b6ddf86" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_b36e927e-897e-47c4-9131-6cb8d2220276" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_e036af61-3a7c-4684-933b-9bdb14f2da06" xlink:to="loc_us-gaap_StatementTable_b36e927e-897e-47c4-9131-6cb8d2220276" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_159324d3-2e41-4906-996f-07b92f5eca1c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_b36e927e-897e-47c4-9131-6cb8d2220276" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_159324d3-2e41-4906-996f-07b92f5eca1c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_159324d3-2e41-4906-996f-07b92f5eca1c_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_159324d3-2e41-4906-996f-07b92f5eca1c" xlink:to="loc_us-gaap_EquityComponentDomain_159324d3-2e41-4906-996f-07b92f5eca1c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_e081f72c-23ca-41ee-8c92-b5f70f6d0307" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_159324d3-2e41-4906-996f-07b92f5eca1c" xlink:to="loc_us-gaap_EquityComponentDomain_e081f72c-23ca-41ee-8c92-b5f70f6d0307" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_a1d0bc3a-0c5f-40d3-b941-79090241eac1" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_e081f72c-23ca-41ee-8c92-b5f70f6d0307" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_a1d0bc3a-0c5f-40d3-b941-79090241eac1" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncomeParenthetical" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CondensedConsolidatedStatementsofComprehensiveIncomeParenthetical"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofComprehensiveIncomeParenthetical" xlink:type="extended" id="i44a2697f85884a8699d9dea09b5cac42_CondensedConsolidatedStatementsofComprehensiveIncomeParenthetical">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_1390147c-d88a-4776-88e7-e3fee2c58a42" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_3ed68451-28cb-4c08-96a1-a71b2f01dab2" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_1390147c-d88a-4776-88e7-e3fee2c58a42" xlink:to="loc_us-gaap_StatementTable_3ed68451-28cb-4c08-96a1-a71b2f01dab2" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CondensedConsolidatedBalanceSheets"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheets" xlink:type="extended" id="id40edee049834acb99b66b03e659ce6c_CondensedConsolidatedBalanceSheets"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CondensedConsolidatedBalanceSheetsParenthetical"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedBalanceSheetsParenthetical" xlink:type="extended" id="i20d3ebe3bb77452d92d8323811cd2a26_CondensedConsolidatedBalanceSheetsParenthetical"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CondensedConsolidatedStatementsofCashFlows"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofCashFlows" xlink:type="extended" id="ia16713d167f84ff9a7f26a9bf6ebc273_CondensedConsolidatedStatementsofCashFlows"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CondensedConsolidatedStatementsofChangesinStockholdersEquity"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquity" xlink:type="extended" id="ibf91d4dcd5924ec6b38c9aa844f3f703_CondensedConsolidatedStatementsofChangesinStockholdersEquity">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_512cfb8a-dbc4-47d6-aad8-b3c12c2ddf84" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_512cfb8a-dbc4-47d6-aad8-b3c12c2ddf84" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_30e99a6e-ef6b-4d61-b7f1-ff55d7dc8145" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_30e99a6e-ef6b-4d61-b7f1-ff55d7dc8145" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_Beginningequitybalancesasadjusted_3b867acd-99c9-43e0-ae9e-bf26921a2405" xlink:href="mtrx-20210331.xsd#mtrx_Beginningequitybalancesasadjusted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_mtrx_Beginningequitybalancesasadjusted_3b867acd-99c9-43e0-ae9e-bf26921a2405" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProfitLoss_ad8a7f32-32e7-400b-9ae5-71b1d341717e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ProfitLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_us-gaap_ProfitLoss_ad8a7f32-32e7-400b-9ae5-71b1d341717e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_fd9ff28e-5450-4592-ad66-0ef4dc2935b0" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax_fd9ff28e-5450-4592-ad66-0ef4dc2935b0" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_2b9d41d4-1e91-4d52-89de-11d71e40b3d4" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_2b9d41d4-1e91-4d52-89de-11d71e40b3d4" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalOther_0cfcc423-d93c-4284-8919-90b063dbb517" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalOther"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalOther_0cfcc423-d93c-4284-8919-90b063dbb517" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_24af6b46-122d-4ea8-9fb0-263702282e9e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_24af6b46-122d-4ea8-9fb0-263702282e9e" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_bc2bdea6-d754-4eea-acaf-fd25f2d0b706" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_bc2bdea6-d754-4eea-acaf-fd25f2d0b706" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OtherTreasurySharePurchases_cbcd483a-ac44-4593-8197-bfb59bf89cbc" xlink:href="mtrx-20210331.xsd#mtrx_OtherTreasurySharePurchases"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_mtrx_OtherTreasurySharePurchases_cbcd483a-ac44-4593-8197-bfb59bf89cbc" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_6c77b616-03c1-4728-ae79-8cac620185fe" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_24b9d8e5-12a8-4b40-b511-9e54d9259369" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_6c77b616-03c1-4728-ae79-8cac620185fe" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_09e8d2d7-4609-467a-8d13-42357997832d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_07683276-ed47-4e0c-a954-2b5d459918a4" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_512cfb8a-dbc4-47d6-aad8-b3c12c2ddf84" xlink:to="loc_us-gaap_StatementTable_07683276-ed47-4e0c-a954-2b5d459918a4" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_919aedd5-022d-4185-93f7-e42846b5629f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_07683276-ed47-4e0c-a954-2b5d459918a4" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_919aedd5-022d-4185-93f7-e42846b5629f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_919aedd5-022d-4185-93f7-e42846b5629f_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_919aedd5-022d-4185-93f7-e42846b5629f" xlink:to="loc_us-gaap_EquityComponentDomain_919aedd5-022d-4185-93f7-e42846b5629f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_92688701-52ce-47a9-a89e-29bb8172c58f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_919aedd5-022d-4185-93f7-e42846b5629f" xlink:to="loc_us-gaap_EquityComponentDomain_92688701-52ce-47a9-a89e-29bb8172c58f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_c2e5ccaa-51d9-44f1-9a76-eedb5b4680c6" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_92688701-52ce-47a9-a89e-29bb8172c58f" xlink:to="loc_us-gaap_CommonStockMember_c2e5ccaa-51d9-44f1-9a76-eedb5b4680c6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_881d10ea-7596-49c1-8dac-9e1fbb4f06bd" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_92688701-52ce-47a9-a89e-29bb8172c58f" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_881d10ea-7596-49c1-8dac-9e1fbb4f06bd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_ca694e3b-7d32-49ed-8ed1-0ab194c7edcf" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_92688701-52ce-47a9-a89e-29bb8172c58f" xlink:to="loc_us-gaap_RetainedEarningsMember_ca694e3b-7d32-49ed-8ed1-0ab194c7edcf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockMember_d064d697-5f83-4576-a325-4dc8601c81d5" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TreasuryStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_92688701-52ce-47a9-a89e-29bb8172c58f" xlink:to="loc_us-gaap_TreasuryStockMember_d064d697-5f83-4576-a325-4dc8601c81d5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_607b3ba6-c4fe-420c-a5a3-49d51c3cdd7e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_92688701-52ce-47a9-a89e-29bb8172c58f" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_607b3ba6-c4fe-420c-a5a3-49d51c3cdd7e" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical" xlink:type="extended" id="i0e7dcede6eec4d64b25ea0f610ebec52_CondensedConsolidatedStatementsofChangesinStockholdersEquityParenthetical">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_62c74b5d-af1c-425a-976d-0a9087410440" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_c380a2c5-c885-40c1-855c-039820025d98" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_62c74b5d-af1c-425a-976d-0a9087410440" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_c380a2c5-c885-40c1-855c-039820025d98" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DeferredSharesIssued_2fe94e8b-e58d-4674-b8ff-ed33d6f23f97" xlink:href="mtrx-20210331.xsd#mtrx_DeferredSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_62c74b5d-af1c-425a-976d-0a9087410440" xlink:to="loc_mtrx_DeferredSharesIssued_2fe94e8b-e58d-4674-b8ff-ed33d6f23f97" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans_79dc9d02-273d-45ac-889c-ece1db45c1eb" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_62c74b5d-af1c-425a-976d-0a9087410440" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesEmployeeStockPurchasePlans_79dc9d02-273d-45ac-889c-ece1db45c1eb" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_8a060f0f-e26b-42ca-bbe5-eeea9d2efc16" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_62c74b5d-af1c-425a-976d-0a9087410440" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_8a060f0f-e26b-42ca-bbe5-eeea9d2efc16" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OtherTreasurySharesAcquired_0b9be30e-4702-4692-b6d7-9a042235b23a" xlink:href="mtrx-20210331.xsd#mtrx_OtherTreasurySharesAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_62c74b5d-af1c-425a-976d-0a9087410440" xlink:to="loc_mtrx_OtherTreasurySharesAcquired_0b9be30e-4702-4692-b6d7-9a042235b23a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_017536bb-ffad-4676-91e2-44823ab70123" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_62c74b5d-af1c-425a-976d-0a9087410440" xlink:to="loc_us-gaap_StatementTable_017536bb-ffad-4676-91e2-44823ab70123" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_4b18f7ea-ee34-47d6-a5b9-7f9000fbbece" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_017536bb-ffad-4676-91e2-44823ab70123" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_4b18f7ea-ee34-47d6-a5b9-7f9000fbbece" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_4b18f7ea-ee34-47d6-a5b9-7f9000fbbece_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_4b18f7ea-ee34-47d6-a5b9-7f9000fbbece" xlink:to="loc_us-gaap_EquityComponentDomain_4b18f7ea-ee34-47d6-a5b9-7f9000fbbece_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_73b7c281-3748-452e-b7fa-8c3dd378f8eb" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_4b18f7ea-ee34-47d6-a5b9-7f9000fbbece" xlink:to="loc_us-gaap_EquityComponentDomain_73b7c281-3748-452e-b7fa-8c3dd378f8eb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_71ed2244-145a-4407-8f6e-78d3d0370b71" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_73b7c281-3748-452e-b7fa-8c3dd378f8eb" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_71ed2244-145a-4407-8f6e-78d3d0370b71" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockMember_33017839-a0c1-48cb-ac87-1ab4fb501524" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TreasuryStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_73b7c281-3748-452e-b7fa-8c3dd378f8eb" xlink:to="loc_us-gaap_TreasuryStockMember_33017839-a0c1-48cb-ac87-1ab4fb501524" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/BasisofPresentationNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#BasisofPresentationNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/BasisofPresentationNotes" xlink:type="extended" id="i7907c196e0b9455fa70036204189fe27_BasisofPresentationNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationLeaseAccountingPolicyPolicies" xlink:type="simple" xlink:href="mtrx-20210331.xsd#BasisofPresentationBasisofPresentationLeaseAccountingPolicyPolicies"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationLeaseAccountingPolicyPolicies" xlink:type="extended" id="i0bf8495f2a07430daea310277111e466_BasisofPresentationBasisofPresentationLeaseAccountingPolicyPolicies"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#BasisofPresentationBasisofPresentationNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/BasisofPresentationBasisofPresentationNarrativeDetails" xlink:type="extended" id="i488899898a924eafa2b5ac47c3083c4f_BasisofPresentationBasisofPresentationNarrativeDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#RevenueNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueNotes" xlink:type="extended" id="id54eaf1c3c514e5d8c8b21458d051b8f_RevenueNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueTables" xlink:type="simple" xlink:href="mtrx-20210331.xsd#RevenueTables"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueTables" xlink:type="extended" id="i8beb58750f8c443fa3d87ec1f008a123_RevenueTables">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_96dc1e20-2b5d-4c14-8ded-32840b618b5e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_867ff691-12de-475b-ba2b-c5bd24ee10f7" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_96dc1e20-2b5d-4c14-8ded-32840b618b5e" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_867ff691-12de-475b-ba2b-c5bd24ee10f7" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_e82e9bf4-1824-476f-8dfb-e87e089a1ddd" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_867ff691-12de-475b-ba2b-c5bd24ee10f7" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_e82e9bf4-1824-476f-8dfb-e87e089a1ddd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_e82e9bf4-1824-476f-8dfb-e87e089a1ddd_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_e82e9bf4-1824-476f-8dfb-e87e089a1ddd" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_e82e9bf4-1824-476f-8dfb-e87e089a1ddd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_78be0762-e44b-4778-8279-ba2c62b4d8af" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_e82e9bf4-1824-476f-8dfb-e87e089a1ddd" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_78be0762-e44b-4778-8279-ba2c62b4d8af" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RevenueDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#RevenueDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RevenueDetails" xlink:type="extended" id="ic2efa4e361744db2b747f6a71bea4d4c_RevenueDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_45fc7b83-0a73-4819-99f3-c1547e0299af" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_275ee2b9-1747-42e5-af2f-3697f147baab" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_45fc7b83-0a73-4819-99f3-c1547e0299af" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerIncludingAssessedTax_275ee2b9-1747-42e5-af2f-3697f147baab" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossOnContracts_fa939953-24b1-4ba7-9c57-3663aeb91998" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LossOnContracts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_45fc7b83-0a73-4819-99f3-c1547e0299af" xlink:to="loc_us-gaap_LossOnContracts_fa939953-24b1-4ba7-9c57-3663aeb91998" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_20e059c3-32d4-40da-a50e-4fc36999474e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_45fc7b83-0a73-4819-99f3-c1547e0299af" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_20e059c3-32d4-40da-a50e-4fc36999474e" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementGeographicalAxis_edd0b8e6-5f48-4a5c-9cc5-4ecc0f661779" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_StatementGeographicalAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_20e059c3-32d4-40da-a50e-4fc36999474e" xlink:to="loc_srt_StatementGeographicalAxis_edd0b8e6-5f48-4a5c-9cc5-4ecc0f661779" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_edd0b8e6-5f48-4a5c-9cc5-4ecc0f661779_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_edd0b8e6-5f48-4a5c-9cc5-4ecc0f661779" xlink:to="loc_srt_SegmentGeographicalDomain_edd0b8e6-5f48-4a5c-9cc5-4ecc0f661779_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_58e4faa3-fa88-4066-9c95-07512611ee28" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_edd0b8e6-5f48-4a5c-9cc5-4ecc0f661779" xlink:to="loc_srt_SegmentGeographicalDomain_58e4faa3-fa88-4066-9c95-07512611ee28" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_US_fcc1a8ae-92ff-4b26-aa21-02a001493ff3" xlink:href="https://xbrl.sec.gov/country/2020/country-2020-01-31.xsd#country_US"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_58e4faa3-fa88-4066-9c95-07512611ee28" xlink:to="loc_country_US_fcc1a8ae-92ff-4b26-aa21-02a001493ff3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_CA_088f59fa-4dea-4418-8612-5b1506788df7" xlink:href="https://xbrl.sec.gov/country/2020/country-2020-01-31.xsd#country_CA"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_58e4faa3-fa88-4066-9c95-07512611ee28" xlink:to="loc_country_CA_088f59fa-4dea-4418-8612-5b1506788df7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_OtherinternationalMember_1c427c59-8299-4979-bce9-3737f6897090" xlink:href="mtrx-20210331.xsd#mtrx_OtherinternationalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_58e4faa3-fa88-4066-9c95-07512611ee28" xlink:to="loc_mtrx_OtherinternationalMember_1c427c59-8299-4979-bce9-3737f6897090" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_b2bfa373-fa87-4623-97ec-5844f8d12a16" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_20e059c3-32d4-40da-a50e-4fc36999474e" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_b2bfa373-fa87-4623-97ec-5844f8d12a16" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_b2bfa373-fa87-4623-97ec-5844f8d12a16_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_b2bfa373-fa87-4623-97ec-5844f8d12a16" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_b2bfa373-fa87-4623-97ec-5844f8d12a16_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_a01aba90-b6db-46ce-82c3-9721e9fb071b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractWithCustomerBasisOfPricingDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingAxis_b2bfa373-fa87-4623-97ec-5844f8d12a16" xlink:to="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_a01aba90-b6db-46ce-82c3-9721e9fb071b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedPriceContractMember_5b1ee766-4a80-461f-ba79-e0c3e771ee1a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FixedPriceContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_a01aba90-b6db-46ce-82c3-9721e9fb071b" xlink:to="loc_us-gaap_FixedPriceContractMember_5b1ee766-4a80-461f-ba79-e0c3e771ee1a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimeAndMaterialsContractMember_694357a4-a814-4432-9f42-e0613a4334fc" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TimeAndMaterialsContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ContractWithCustomerBasisOfPricingDomain_a01aba90-b6db-46ce-82c3-9721e9fb071b" xlink:to="loc_us-gaap_TimeAndMaterialsContractMember_694357a4-a814-4432-9f42-e0613a4334fc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_bdf92cd6-53fb-4439-bd7d-8f8798d663e1" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_20e059c3-32d4-40da-a50e-4fc36999474e" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_bdf92cd6-53fb-4439-bd7d-8f8798d663e1" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_bdf92cd6-53fb-4439-bd7d-8f8798d663e1_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_bdf92cd6-53fb-4439-bd7d-8f8798d663e1" xlink:to="loc_us-gaap_SegmentDomain_bdf92cd6-53fb-4439-bd7d-8f8798d663e1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_9eac77a3-b2f1-4183-a204-34e3af9d89da" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_bdf92cd6-53fb-4439-bd7d-8f8798d663e1" xlink:to="loc_us-gaap_SegmentDomain_9eac77a3-b2f1-4183-a204-34e3af9d89da" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UtilityAndPowerInfrastructureMember_62a184f1-39c4-4e4d-8024-b969eec3679e" xlink:href="mtrx-20210331.xsd#mtrx_UtilityAndPowerInfrastructureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_9eac77a3-b2f1-4183-a204-34e3af9d89da" xlink:to="loc_mtrx_UtilityAndPowerInfrastructureMember_62a184f1-39c4-4e4d-8024-b969eec3679e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_StorageAndTerminalSolutionsMember_4b3365ca-19eb-45d6-9e85-3d10d1e3dbc7" xlink:href="mtrx-20210331.xsd#mtrx_StorageAndTerminalSolutionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_9eac77a3-b2f1-4183-a204-34e3af9d89da" xlink:to="loc_mtrx_StorageAndTerminalSolutionsMember_4b3365ca-19eb-45d6-9e85-3d10d1e3dbc7" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#LeasesNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/LeasesNotes" xlink:type="extended" id="i17280d56856f45af8b844a37ea206cc2_LeasesNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesTables" xlink:type="simple" xlink:href="mtrx-20210331.xsd#LeasesTables"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/LeasesTables" xlink:type="extended" id="i88d184f3db3e4e1d8548d89fecf88092_LeasesTables"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesNarrativeDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#LeasesNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/LeasesNarrativeDetails" xlink:type="extended" id="i8d518464ca0748f9b4e145a89eb21358_LeasesNarrativeDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#LeasesComponentsofLeaseCostsDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/LeasesComponentsofLeaseCostsDetails" xlink:type="extended" id="ie53c661c766440d188e54bfaf6f030a7_LeasesComponentsofLeaseCostsDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#LeasesMaturityAnalysisDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/LeasesMaturityAnalysisDetails" xlink:type="extended" id="i59f778e5b00e4bb5b3ee82faa5831f5c_LeasesMaturityAnalysisDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesOtherLeaseInformationDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#LeasesOtherLeaseInformationDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/LeasesOtherLeaseInformationDetails" xlink:type="extended" id="i0ca38c85aeee4e4d904dca174603113d_LeasesOtherLeaseInformationDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/LeasesSupplementalCashFlowDisclosuresDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#LeasesSupplementalCashFlowDisclosuresDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/LeasesSupplementalCashFlowDisclosuresDetails" xlink:type="extended" id="i52c6ae92058e4b928fa5aa91003c718a_LeasesSupplementalCashFlowDisclosuresDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#IntangibleAssetsIncludingGoodwillNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillNotes" xlink:type="extended" id="i166d76dd925b4213ad3a45229350db9d_IntangibleAssetsIncludingGoodwillNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables" xlink:type="simple" xlink:href="mtrx-20210331.xsd#IntangibleAssetsIncludingGoodwillTables"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillTables" xlink:type="extended" id="i5feff7fdeead4cdeb4c1ff477a7bb570_IntangibleAssetsIncludingGoodwillTables">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_4e73e0ea-4509-4c7e-957d-9bca352077db" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGoodwillTextBlock_97f9a8bc-2fe9-484d-808d-f34bc8a885d1" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfGoodwillTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_4e73e0ea-4509-4c7e-957d-9bca352077db" xlink:to="loc_us-gaap_ScheduleOfGoodwillTextBlock_97f9a8bc-2fe9-484d-808d-f34bc8a885d1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_ScheduleOfIntangibleAssetsExcludingGoodwillTableTextBlock_0d1941e3-a629-44cf-8d30-bfb0145600f8" xlink:href="mtrx-20210331.xsd#mtrx_ScheduleOfIntangibleAssetsExcludingGoodwillTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_4e73e0ea-4509-4c7e-957d-9bca352077db" xlink:to="loc_mtrx_ScheduleOfIntangibleAssetsExcludingGoodwillTableTextBlock_0d1941e3-a629-44cf-8d30-bfb0145600f8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleofFiniteLivedIntangibleAssetsFutureAmortizationExpenseTableTextBlock_0221391e-dd18-4ade-9064-e1c9bfb54156" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleofFiniteLivedIntangibleAssetsFutureAmortizationExpenseTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_4e73e0ea-4509-4c7e-957d-9bca352077db" xlink:to="loc_us-gaap_ScheduleofFiniteLivedIntangibleAssetsFutureAmortizationExpenseTableTextBlock_0221391e-dd18-4ade-9064-e1c9bfb54156" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_28d9127d-b41c-4c20-8650-f627eb9382d7" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_4e73e0ea-4509-4c7e-957d-9bca352077db" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_28d9127d-b41c-4c20-8650-f627eb9382d7" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_862c04ca-da7b-4d44-b470-8208b4be3a19" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_28d9127d-b41c-4c20-8650-f627eb9382d7" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_862c04ca-da7b-4d44-b470-8208b4be3a19" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_862c04ca-da7b-4d44-b470-8208b4be3a19_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_862c04ca-da7b-4d44-b470-8208b4be3a19" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_862c04ca-da7b-4d44-b470-8208b4be3a19_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_272b31e5-8929-4747-8336-34ff8fe4196a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_862c04ca-da7b-4d44-b470-8208b4be3a19" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_272b31e5-8929-4747-8336-34ff8fe4196a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_c2408142-ca4d-46a8-ac40-d6d7098f798c" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_28d9127d-b41c-4c20-8650-f627eb9382d7" xlink:to="loc_srt_ConsolidationItemsAxis_c2408142-ca4d-46a8-ac40-d6d7098f798c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_c2408142-ca4d-46a8-ac40-d6d7098f798c_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_c2408142-ca4d-46a8-ac40-d6d7098f798c" xlink:to="loc_srt_ConsolidationItemsDomain_c2408142-ca4d-46a8-ac40-d6d7098f798c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_911fcc4f-2513-4de8-a569-e78fca315ae7" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_c2408142-ca4d-46a8-ac40-d6d7098f798c" xlink:to="loc_srt_ConsolidationItemsDomain_911fcc4f-2513-4de8-a569-e78fca315ae7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_57b415af-1e52-4abc-8b09-bd6b010f6014" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_28d9127d-b41c-4c20-8650-f627eb9382d7" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_57b415af-1e52-4abc-8b09-bd6b010f6014" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_57b415af-1e52-4abc-8b09-bd6b010f6014_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_57b415af-1e52-4abc-8b09-bd6b010f6014" xlink:to="loc_us-gaap_SegmentDomain_57b415af-1e52-4abc-8b09-bd6b010f6014_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_23ae248f-839a-484d-be66-3cd8d0c86ef2" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_57b415af-1e52-4abc-8b09-bd6b010f6014" xlink:to="loc_us-gaap_SegmentDomain_23ae248f-839a-484d-be66-3cd8d0c86ef2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_e9201f4f-fa37-4fda-adad-94f59d6801e1" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_28d9127d-b41c-4c20-8650-f627eb9382d7" xlink:to="loc_srt_RangeAxis_e9201f4f-fa37-4fda-adad-94f59d6801e1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_e9201f4f-fa37-4fda-adad-94f59d6801e1_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_e9201f4f-fa37-4fda-adad-94f59d6801e1" xlink:to="loc_srt_RangeMember_e9201f4f-fa37-4fda-adad-94f59d6801e1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_c60b5086-bd08-4dd8-a676-16c71465d0bc" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_e9201f4f-fa37-4fda-adad-94f59d6801e1" xlink:to="loc_srt_RangeMember_c60b5086-bd08-4dd8-a676-16c71465d0bc" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails" xlink:type="extended" id="i3027392134e144dfb5b126c9a768b451_IntangibleAssetsIncludingGoodwillCarryingValueofGoodwillBySegmentDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillLineItems_e3910d68-2c02-40a2-b2cc-aa8eb0441a48" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillGross_1bf84cf2-9d66-4660-a92b-84a3107d7b06" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_e3910d68-2c02-40a2-b2cc-aa8eb0441a48" xlink:to="loc_us-gaap_GoodwillGross_1bf84cf2-9d66-4660-a92b-84a3107d7b06" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_53678cd6-77be-432a-a67c-78d444c4d551" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillImpairedAccumulatedImpairmentLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_e3910d68-2c02-40a2-b2cc-aa8eb0441a48" xlink:to="loc_us-gaap_GoodwillImpairedAccumulatedImpairmentLoss_53678cd6-77be-432a-a67c-78d444c4d551" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_a1c5dd2e-e7e8-4f3e-8e3a-d5cc0a50f0f9" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_e3910d68-2c02-40a2-b2cc-aa8eb0441a48" xlink:to="loc_us-gaap_Goodwill_a1c5dd2e-e7e8-4f3e-8e3a-d5cc0a50f0f9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReportingUnitAmountOfFairValueInExcessOfCarryingAmount_0e8b81a2-b171-4e8b-af96-8c46a3ebe0ef" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ReportingUnitAmountOfFairValueInExcessOfCarryingAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_e3910d68-2c02-40a2-b2cc-aa8eb0441a48" xlink:to="loc_us-gaap_ReportingUnitAmountOfFairValueInExcessOfCarryingAmount_0e8b81a2-b171-4e8b-af96-8c46a3ebe0ef" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount_85bd67f5-9098-4073-872c-dbdb2fc7996a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_e3910d68-2c02-40a2-b2cc-aa8eb0441a48" xlink:to="loc_us-gaap_ReportingUnitPercentageOfFairValueInExcessOfCarryingAmount_85bd67f5-9098-4073-872c-dbdb2fc7996a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillRollForward_f9446334-7613-475f-bd86-91539b6ffd40" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_e3910d68-2c02-40a2-b2cc-aa8eb0441a48" xlink:to="loc_us-gaap_GoodwillRollForward_f9446334-7613-475f-bd86-91539b6ffd40" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_1325ba0f-3b21-4021-976d-34b910940091" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Goodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillAcquiredDuringPeriod_fd5784de-545f-4a7f-b547-db477fb71091" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillAcquiredDuringPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_f9446334-7613-475f-bd86-91539b6ffd40" xlink:to="loc_us-gaap_GoodwillAcquiredDuringPeriod_fd5784de-545f-4a7f-b547-db477fb71091" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillWrittenOffRelatedToSaleOfBusinessUnit_337cc4fb-dc48-483d-be9a-bd040b7fe009" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillWrittenOffRelatedToSaleOfBusinessUnit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_f9446334-7613-475f-bd86-91539b6ffd40" xlink:to="loc_us-gaap_GoodwillWrittenOffRelatedToSaleOfBusinessUnit_337cc4fb-dc48-483d-be9a-bd040b7fe009" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillImpairmentLoss_140800f6-b1af-4686-899d-e3ed5ecfd643" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillImpairmentLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_f9446334-7613-475f-bd86-91539b6ffd40" xlink:to="loc_us-gaap_GoodwillImpairmentLoss_140800f6-b1af-4686-899d-e3ed5ecfd643" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_0d40f048-1941-4ffd-a849-1a0ee6902b77" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillForeignCurrencyTranslationGainLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_f9446334-7613-475f-bd86-91539b6ffd40" xlink:to="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_0d40f048-1941-4ffd-a849-1a0ee6902b77" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_8f3d6fb5-280e-4c5e-a8ee-7fb95b3231a1" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Goodwill"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGoodwillTable_a66ef4e6-9fe6-4beb-81b9-dd97e4a7c796" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfGoodwillTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_e3910d68-2c02-40a2-b2cc-aa8eb0441a48" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_a66ef4e6-9fe6-4beb-81b9-dd97e4a7c796" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_8f5417a6-3015-4e87-b263-5030b5d8df57" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_a66ef4e6-9fe6-4beb-81b9-dd97e4a7c796" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_8f5417a6-3015-4e87-b263-5030b5d8df57" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8f5417a6-3015-4e87-b263-5030b5d8df57_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8f5417a6-3015-4e87-b263-5030b5d8df57" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_8f5417a6-3015-4e87-b263-5030b5d8df57_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_bc0f9b3d-1625-4a8f-8c70-67801b50d8be" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_8f5417a6-3015-4e87-b263-5030b5d8df57" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_bc0f9b3d-1625-4a8f-8c70-67801b50d8be" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_BaillieTankEquipmentLtd.Member_46f31368-74a4-4912-81d6-cdf6d78b188f" xlink:href="mtrx-20210331.xsd#mtrx_BaillieTankEquipmentLtd.Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_bc0f9b3d-1625-4a8f-8c70-67801b50d8be" xlink:to="loc_mtrx_BaillieTankEquipmentLtd.Member_46f31368-74a4-4912-81d6-cdf6d78b188f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_HoustonInterestsLLCMember_c92b3ee2-5e41-43f2-bf2f-ec320f0b73c4" xlink:href="mtrx-20210331.xsd#mtrx_HoustonInterestsLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_bc0f9b3d-1625-4a8f-8c70-67801b50d8be" xlink:to="loc_mtrx_HoustonInterestsLLCMember_c92b3ee2-5e41-43f2-bf2f-ec320f0b73c4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_c6a58070-9ca6-4853-8175-4cbf4dbe1b5b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_a66ef4e6-9fe6-4beb-81b9-dd97e4a7c796" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_c6a58070-9ca6-4853-8175-4cbf4dbe1b5b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_c6a58070-9ca6-4853-8175-4cbf4dbe1b5b_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_c6a58070-9ca6-4853-8175-4cbf4dbe1b5b" xlink:to="loc_us-gaap_SegmentDomain_c6a58070-9ca6-4853-8175-4cbf4dbe1b5b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_b8dced55-872b-4f84-adfe-b4968b53c3fa" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_c6a58070-9ca6-4853-8175-4cbf4dbe1b5b" xlink:to="loc_us-gaap_SegmentDomain_b8dced55-872b-4f84-adfe-b4968b53c3fa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UtilityAndPowerInfrastructureMember_b0f833d5-5073-4b31-be7f-9de6b2183de7" xlink:href="mtrx-20210331.xsd#mtrx_UtilityAndPowerInfrastructureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b8dced55-872b-4f84-adfe-b4968b53c3fa" xlink:to="loc_mtrx_UtilityAndPowerInfrastructureMember_b0f833d5-5073-4b31-be7f-9de6b2183de7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_ProcessAndIndustrialFacilitiesMember_41bf8206-4f10-4183-a413-4ef0803cca08" xlink:href="mtrx-20210331.xsd#mtrx_ProcessAndIndustrialFacilitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b8dced55-872b-4f84-adfe-b4968b53c3fa" xlink:to="loc_mtrx_ProcessAndIndustrialFacilitiesMember_41bf8206-4f10-4183-a413-4ef0803cca08" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_StorageAndTerminalSolutionsMember_7d78e4d8-2bc0-4fe0-a479-affdb6cd8f72" xlink:href="mtrx-20210331.xsd#mtrx_StorageAndTerminalSolutionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_b8dced55-872b-4f84-adfe-b4968b53c3fa" xlink:to="loc_mtrx_StorageAndTerminalSolutionsMember_7d78e4d8-2bc0-4fe0-a479-affdb6cd8f72" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails" xlink:type="extended" id="ib022ff6a5fc04dd6ace56102f5faf2bf_IntangibleAssetsIncludingGoodwillCarryingValueofOtherIntangibleAssetsDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_2da9141e-df55-43c4-a7c6-cfd779272def" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_2da9141e-df55-43c4-a7c6-cfd779272def" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_b4e70873-0e43-494e-a848-4da53258f7ca" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_b4e70873-0e43-494e-a848-4da53258f7ca" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_b5e4b113-e18a-4985-b314-c274131197a6" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_b5e4b113-e18a-4985-b314-c274131197a6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1_407a4ecc-52e4-4a3c-8a99-62133adc431c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsRemainingAmortizationPeriod1_407a4ecc-52e4-4a3c-8a99-62133adc431c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_a8fca6fc-d2d4-4f8d-b1af-50a0141ee58e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_a8fca6fc-d2d4-4f8d-b1af-50a0141ee58e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsNet_eed231bf-c270-4254-8aa5-10aada0e65e2" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsNet_eed231bf-c270-4254-8aa5-10aada0e65e2" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedTradeNames_d114a7e5-6ade-47c6-8044-bbfcb8a13353" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IndefiniteLivedTradeNames"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_IndefiniteLivedTradeNames_d114a7e5-6ade-47c6-8044-bbfcb8a13353" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_fff0b1c1-b954-48a2-981c-307507adbd6e" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_fff0b1c1-b954-48a2-981c-307507adbd6e" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_f2a0bb0e-11f1-4f17-92ea-ebdd404f5731" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_f2a0bb0e-11f1-4f17-92ea-ebdd404f5731" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_62b9ab9f-8672-4a33-b315-7496c0895fbb" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_785518f6-3405-4320-840d-464bfd3593dc" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_62b9ab9f-8672-4a33-b315-7496c0895fbb" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_f46d1333-d700-47f1-808c-b0a2d11f5ff7" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_62b9ab9f-8672-4a33-b315-7496c0895fbb" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_f46d1333-d700-47f1-808c-b0a2d11f5ff7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_f46d1333-d700-47f1-808c-b0a2d11f5ff7_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_f46d1333-d700-47f1-808c-b0a2d11f5ff7" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_f46d1333-d700-47f1-808c-b0a2d11f5ff7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_69944713-2522-47d6-8d25-6297abffdffc" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_f46d1333-d700-47f1-808c-b0a2d11f5ff7" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_69944713-2522-47d6-8d25-6297abffdffc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_HoustonInterestsLLCMember_f84d4c58-bcce-4e9b-b3c5-b7324822559c" xlink:href="mtrx-20210331.xsd#mtrx_HoustonInterestsLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_69944713-2522-47d6-8d25-6297abffdffc" xlink:to="loc_mtrx_HoustonInterestsLLCMember_f84d4c58-bcce-4e9b-b3c5-b7324822559c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_65312876-0563-466c-9e02-47961b390e9c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_62b9ab9f-8672-4a33-b315-7496c0895fbb" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_65312876-0563-466c-9e02-47961b390e9c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_65312876-0563-466c-9e02-47961b390e9c_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_65312876-0563-466c-9e02-47961b390e9c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_65312876-0563-466c-9e02-47961b390e9c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e6970ce6-3640-4903-98ae-626382389938" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_65312876-0563-466c-9e02-47961b390e9c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e6970ce6-3640-4903-98ae-626382389938" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntellectualPropertyMember_a7665829-b24a-414b-9fb8-5933861b95fd" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IntellectualPropertyMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e6970ce6-3640-4903-98ae-626382389938" xlink:to="loc_us-gaap_IntellectualPropertyMember_a7665829-b24a-414b-9fb8-5933861b95fd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelationshipsMember_ab27c535-d501-46de-b67d-713d244732bb" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CustomerRelationshipsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e6970ce6-3640-4903-98ae-626382389938" xlink:to="loc_us-gaap_CustomerRelationshipsMember_ab27c535-d501-46de-b67d-713d244732bb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncompeteAgreementsMember_02aec12d-f6f8-4c00-8034-3dd209f96f53" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NoncompeteAgreementsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e6970ce6-3640-4903-98ae-626382389938" xlink:to="loc_us-gaap_NoncompeteAgreementsMember_02aec12d-f6f8-4c00-8034-3dd209f96f53" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TradeNamesMember_c3c8711a-f2b8-40aa-b24c-17e8fa2a2658" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TradeNamesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e6970ce6-3640-4903-98ae-626382389938" xlink:to="loc_us-gaap_TradeNamesMember_c3c8711a-f2b8-40aa-b24c-17e8fa2a2658" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_IronandSteelCustomerRelationshipMember_934b2f9e-0069-441c-aada-fe50cb62fb0e" xlink:href="mtrx-20210331.xsd#mtrx_IronandSteelCustomerRelationshipMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_e6970ce6-3640-4903-98ae-626382389938" xlink:to="loc_mtrx_IronandSteelCustomerRelationshipMember_934b2f9e-0069-441c-aada-fe50cb62fb0e" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_95db7350-b80e-436e-a0f1-000d7bb886e2" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_62b9ab9f-8672-4a33-b315-7496c0895fbb" xlink:to="loc_srt_RangeAxis_95db7350-b80e-436e-a0f1-000d7bb886e2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_95db7350-b80e-436e-a0f1-000d7bb886e2_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_95db7350-b80e-436e-a0f1-000d7bb886e2" xlink:to="loc_srt_RangeMember_95db7350-b80e-436e-a0f1-000d7bb886e2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_f1b47a0f-ac28-40bf-8d10-6e4ee4f5933e" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_95db7350-b80e-436e-a0f1-000d7bb886e2" xlink:to="loc_srt_RangeMember_f1b47a0f-ac28-40bf-8d10-6e4ee4f5933e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_5fbade46-9e27-4128-ac86-f34e5fb1023d" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_f1b47a0f-ac28-40bf-8d10-6e4ee4f5933e" xlink:to="loc_srt_MinimumMember_5fbade46-9e27-4128-ac86-f34e5fb1023d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_f03a28cf-cd9a-4f45-bbdf-a5b04429668d" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_f1b47a0f-ac28-40bf-8d10-6e4ee4f5933e" xlink:to="loc_srt_MaximumMember_f03a28cf-cd9a-4f45-bbdf-a5b04429668d" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails" xlink:type="extended" id="i43b4248f36c74c38aa4733b1330a2214_IntangibleAssetsIncludingGoodwillFutureExpectedAmortizationExpenseDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_e24ae4b2-2cb3-49fd-86d9-c358f4439738" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AmortizationOfIntangibleAssets_463f0ccc-401c-4fe2-9744-3944b22ec221" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AmortizationOfIntangibleAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_e24ae4b2-2cb3-49fd-86d9-c358f4439738" xlink:to="loc_us-gaap_AmortizationOfIntangibleAssets_463f0ccc-401c-4fe2-9744-3944b22ec221" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_2832d008-79a9-4475-8711-3b19b3356d55" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_e24ae4b2-2cb3-49fd-86d9-c358f4439738" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_2832d008-79a9-4475-8711-3b19b3356d55" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_a74195a1-0ce5-4808-beea-110eaf61c70c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_2832d008-79a9-4475-8711-3b19b3356d55" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_a74195a1-0ce5-4808-beea-110eaf61c70c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_a74195a1-0ce5-4808-beea-110eaf61c70c_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_a74195a1-0ce5-4808-beea-110eaf61c70c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_a74195a1-0ce5-4808-beea-110eaf61c70c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_866f1717-9921-4123-ae11-b79ca82edada" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_a74195a1-0ce5-4808-beea-110eaf61c70c" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_866f1717-9921-4123-ae11-b79ca82edada" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_d02070d5-9e40-43c2-8978-a8804f2eb2f8" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_2832d008-79a9-4475-8711-3b19b3356d55" xlink:to="loc_srt_ConsolidationItemsAxis_d02070d5-9e40-43c2-8978-a8804f2eb2f8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_d02070d5-9e40-43c2-8978-a8804f2eb2f8_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_d02070d5-9e40-43c2-8978-a8804f2eb2f8" xlink:to="loc_srt_ConsolidationItemsDomain_d02070d5-9e40-43c2-8978-a8804f2eb2f8_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_65bd449e-f10c-4d16-a656-3879229dda74" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_d02070d5-9e40-43c2-8978-a8804f2eb2f8" xlink:to="loc_srt_ConsolidationItemsDomain_65bd449e-f10c-4d16-a656-3879229dda74" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_93499fa8-9fc6-4444-ab15-a87a2fbfc6d4" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_2832d008-79a9-4475-8711-3b19b3356d55" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_93499fa8-9fc6-4444-ab15-a87a2fbfc6d4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_93499fa8-9fc6-4444-ab15-a87a2fbfc6d4_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_93499fa8-9fc6-4444-ab15-a87a2fbfc6d4" xlink:to="loc_us-gaap_SegmentDomain_93499fa8-9fc6-4444-ab15-a87a2fbfc6d4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_4c5eba6c-e57c-4770-946f-763c28837e0c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_93499fa8-9fc6-4444-ab15-a87a2fbfc6d4" xlink:to="loc_us-gaap_SegmentDomain_4c5eba6c-e57c-4770-946f-763c28837e0c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_21fb1985-2edc-480e-b578-f57ececb01cb" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_2832d008-79a9-4475-8711-3b19b3356d55" xlink:to="loc_srt_RangeAxis_21fb1985-2edc-480e-b578-f57ececb01cb" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_21fb1985-2edc-480e-b578-f57ececb01cb_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_21fb1985-2edc-480e-b578-f57ececb01cb" xlink:to="loc_srt_RangeMember_21fb1985-2edc-480e-b578-f57ececb01cb_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_b80cd194-b9fa-41c1-b544-1348ab77cf88" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_21fb1985-2edc-480e-b578-f57ececb01cb" xlink:to="loc_srt_RangeMember_b80cd194-b9fa-41c1-b544-1348ab77cf88" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#DebtNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/DebtNotes" xlink:type="extended" id="ic34c57d28e3042c698474277a58cf27a_DebtNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtTables" xlink:type="simple" xlink:href="mtrx-20210331.xsd#DebtTables"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/DebtTables" xlink:type="extended" id="i09ee9c25d9a34476803d66ea23e38de9_DebtTables"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtAdditionalInformationDetail" xlink:type="simple" xlink:href="mtrx-20210331.xsd#DebtAdditionalInformationDetail"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/DebtAdditionalInformationDetail" xlink:type="extended" id="ie2a02384e5124f06bba357e4316b9a81_DebtAdditionalInformationDetail">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MtrxLineOfCreditFacilityMaximumBorrowingCapacityNewAgreementAmount_a26a1ece-c58d-48ef-98ec-791fb11ac2bb" xlink:href="mtrx-20210331.xsd#mtrx_MtrxLineOfCreditFacilityMaximumBorrowingCapacityNewAgreementAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_MtrxLineOfCreditFacilityMaximumBorrowingCapacityNewAgreementAmount_a26a1ece-c58d-48ef-98ec-791fb11ac2bb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_CreditAgreementTerm_a5499147-f180-486e-b7a2-17e6c3bc449e" xlink:href="mtrx-20210331.xsd#mtrx_CreditAgreementTerm"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_CreditAgreementTerm_a5499147-f180-486e-b7a2-17e6c3bc449e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_56b7046f-1a07-4b0c-87e0-36c633f3debf" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_56b7046f-1a07-4b0c-87e0-36c633f3debf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MtrxLineofcreditfacilityexpirationdate_7669534f-1ac0-4899-b9bd-8c0bcdb2e4f9" xlink:href="mtrx-20210331.xsd#mtrx_MtrxLineofcreditfacilityexpirationdate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_MtrxLineofcreditfacilityexpirationdate_7669534f-1ac0-4899-b9bd-8c0bcdb2e4f9" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling_cce0ef89-061e-4119-9f17-bffd03b0b135" xlink:href="mtrx-20210331.xsd#mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_SublimitonAustralianDollarCanadianDollarEuroandPoundsSterling_cce0ef89-061e-4119-9f17-bffd03b0b135" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MtrxSublimitonlettersofcreditunderthecreditfacility_d67c92e0-c989-4350-8997-cb71df0ff6f4" xlink:href="mtrx-20210331.xsd#mtrx_MtrxSublimitonlettersofcreditunderthecreditfacility"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_MtrxSublimitonlettersofcreditunderthecreditfacility_d67c92e0-c989-4350-8997-cb71df0ff6f4" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum_48b89d22-4118-4e31-afdd-a59ba90d352a" xlink:href="mtrx-20210331.xsd#mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMinimum_48b89d22-4118-4e31-afdd-a59ba90d352a" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum_3f219bda-74ba-4dfa-afb2-3a671dd9c80b" xlink:href="mtrx-20210331.xsd#mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAlternateBaseRateMaximum_3f219bda-74ba-4dfa-afb2-3a671dd9c80b" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum_00d058a4-d31c-42a3-9a4f-6ea210745c8c" xlink:href="mtrx-20210331.xsd#mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMinimum_00d058a4-d31c-42a3-9a4f-6ea210745c8c" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum_fbd00851-cc02-494d-8206-2201b081a2b9" xlink:href="mtrx-20210331.xsd#mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnAdjustedLIBOEURIBOandCDORMaximum_fbd00851-cc02-494d-8206-2201b081a2b9" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum_074c30e8-d580-472b-8755-27ea73ffaee9" xlink:href="mtrx-20210331.xsd#mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMinimum_074c30e8-d580-472b-8755-27ea73ffaee9" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum_85a65943-b593-4af0-923b-d2eb6652dc3c" xlink:href="mtrx-20210331.xsd#mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_LineOfCreditBasisSpreadOnCanadianPrimeRateMaximum_85a65943-b593-4af0-923b-d2eb6652dc3c" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage_0e28355f-fcc2-4841-b369-f4f9fbad5022" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage_0e28355f-fcc2-4841-b369-f4f9fbad5022" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_SeniorLeverageRatioMax_ad5698d0-6806-4d37-a2d5-098c06702b6c" xlink:href="mtrx-20210331.xsd#mtrx_SeniorLeverageRatioMax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_SeniorLeverageRatioMax_ad5698d0-6806-4d37-a2d5-098c06702b6c" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_SeniorLeverageRatioMin_22434186-773a-452f-a5a6-3ada48824268" xlink:href="mtrx-20210331.xsd#mtrx_SeniorLeverageRatioMin"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_SeniorLeverageRatioMin_22434186-773a-452f-a5a6-3ada48824268" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_FixedChargeCoverageRatioMaximum_a7306318-c967-45c8-8f46-37db1386c4d1" xlink:href="mtrx-20210331.xsd#mtrx_FixedChargeCoverageRatioMaximum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_FixedChargeCoverageRatioMaximum_a7306318-c967-45c8-8f46-37db1386c4d1" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_FixedChargeCoverageRatioMinimum_66aa62a6-2905-4c1d-9e8f-60d75e7b285b" xlink:href="mtrx-20210331.xsd#mtrx_FixedChargeCoverageRatioMinimum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_FixedChargeCoverageRatioMinimum_66aa62a6-2905-4c1d-9e8f-60d75e7b285b" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MtrxFixedChargeCoverageRatioShareRepurchaseExclusion_b5d0c3e0-c77e-4a53-831d-f23662783809" xlink:href="mtrx-20210331.xsd#mtrx_MtrxFixedChargeCoverageRatioShareRepurchaseExclusion"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_MtrxFixedChargeCoverageRatioShareRepurchaseExclusion_b5d0c3e0-c77e-4a53-831d-f23662783809" xlink:type="arc" order="17"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_AmountOfLimitOnAssetDispositions_ca220722-adf5-4b4d-beb7-493024c2bb05" xlink:href="mtrx-20210331.xsd#mtrx_AmountOfLimitOnAssetDispositions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_mtrx_AmountOfLimitOnAssetDispositions_ca220722-adf5-4b4d-beb7-493024c2bb05" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchaseProgramAuthorizedAmount1_2c03124c-e345-4408-81cf-9130a792aba0" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockRepurchaseProgramAuthorizedAmount1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_us-gaap_StockRepurchaseProgramAuthorizedAmount1_2c03124c-e345-4408-81cf-9130a792aba0" xlink:type="arc" order="19"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_3cd18fca-fc69-4f66-81b1-2a7e2961a48f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AcquiredIndefiniteLivedIntangibleAssetsLineItems_775e8d48-6149-438f-9940-6663dce69d30" xlink:to="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_3cd18fca-fc69-4f66-81b1-2a7e2961a48f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateAxis_4c582e3a-e19f-44e5-8cff-ea1585903b23" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_VariableRateAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_3cd18fca-fc69-4f66-81b1-2a7e2961a48f" xlink:to="loc_us-gaap_VariableRateAxis_4c582e3a-e19f-44e5-8cff-ea1585903b23" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateDomain_4c582e3a-e19f-44e5-8cff-ea1585903b23_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_VariableRateDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_4c582e3a-e19f-44e5-8cff-ea1585903b23" xlink:to="loc_us-gaap_VariableRateDomain_4c582e3a-e19f-44e5-8cff-ea1585903b23_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateDomain_eb87cf2f-cdad-4ec8-8e68-371c432ee0e1" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_VariableRateDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_4c582e3a-e19f-44e5-8cff-ea1585903b23" xlink:to="loc_us-gaap_VariableRateDomain_eb87cf2f-cdad-4ec8-8e68-371c432ee0e1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_CdorRateMember_995e710a-ed53-4c4d-8874-0440a812ec68" xlink:href="mtrx-20210331.xsd#mtrx_CdorRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_eb87cf2f-cdad-4ec8-8e68-371c432ee0e1" xlink:to="loc_mtrx_CdorRateMember_995e710a-ed53-4c4d-8874-0440a812ec68" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_CanadianPrimeRateMember_fbbb8c24-957f-4d27-a122-2d9ef85d3175" xlink:href="mtrx-20210331.xsd#mtrx_CanadianPrimeRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_eb87cf2f-cdad-4ec8-8e68-371c432ee0e1" xlink:to="loc_mtrx_CanadianPrimeRateMember_fbbb8c24-957f-4d27-a122-2d9ef85d3175" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_DebtAmendmentMember_a4f8a67c-9bd1-49f8-a667-4ad31ee809f1" xlink:href="mtrx-20210331.xsd#mtrx_DebtAmendmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_eb87cf2f-cdad-4ec8-8e68-371c432ee0e1" xlink:to="loc_mtrx_DebtAmendmentMember_a4f8a67c-9bd1-49f8-a667-4ad31ee809f1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_599e4053-e5e2-4798-b0a8-ce06ba0f5adf" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAcquiredIndefiniteLivedIntangibleAssetsByMajorClassTable_3cd18fca-fc69-4f66-81b1-2a7e2961a48f" xlink:to="loc_srt_RangeAxis_599e4053-e5e2-4798-b0a8-ce06ba0f5adf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_599e4053-e5e2-4798-b0a8-ce06ba0f5adf_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_599e4053-e5e2-4798-b0a8-ce06ba0f5adf" xlink:to="loc_srt_RangeMember_599e4053-e5e2-4798-b0a8-ce06ba0f5adf_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_7d2dd5e7-61d3-400d-a33f-f9f1ddb43f6a" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_599e4053-e5e2-4798-b0a8-ce06ba0f5adf" xlink:to="loc_srt_RangeMember_7d2dd5e7-61d3-400d-a33f-f9f1ddb43f6a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_6ff18c01-6179-4267-9d01-e3faada72817" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_7d2dd5e7-61d3-400d-a33f-f9f1ddb43f6a" xlink:to="loc_srt_MinimumMember_6ff18c01-6179-4267-9d01-e3faada72817" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_7e523ded-ad51-4f50-9542-e92e9ba02948" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_7d2dd5e7-61d3-400d-a33f-f9f1ddb43f6a" xlink:to="loc_srt_MaximumMember_7e523ded-ad51-4f50-9542-e92e9ba02948" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_41f084ef-caef-4370-bc32-12683eb11dc0" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_0f8acfc4-b577-4058-9516-f9630e47d619" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LineOfCreditFacilityTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_41f084ef-caef-4370-bc32-12683eb11dc0" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_0f8acfc4-b577-4058-9516-f9630e47d619" xlink:type="arc" order="2" xbrldt:closed="true" xbrldt:contextElement="segment"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/DebtAvailabilityUnderTheSeniorCreditFacilityDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#DebtAvailabilityUnderTheSeniorCreditFacilityDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/DebtAvailabilityUnderTheSeniorCreditFacilityDetails" xlink:type="extended" id="i8688d48a8d544d1cb8098bdeccf7550e_DebtAvailabilityUnderTheSeniorCreditFacilityDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#IncomeTaxes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxes" xlink:type="extended" id="i344d701b30da41c2a6d20ee1235a08ab_IncomeTaxes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CoronavirusAidReliefandEconomicSecurityActDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CoronavirusAidReliefandEconomicSecurityActDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CoronavirusAidReliefandEconomicSecurityActDetails" xlink:type="extended" id="id97204a5b2aa41059173e5b4d1d8e581_CoronavirusAidReliefandEconomicSecurityActDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/IncomeTaxesDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#IncomeTaxesDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/IncomeTaxesDetails" xlink:type="extended" id="i205d5835aa6641efbcbed4e0edce30c4_IncomeTaxesDetails"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CommitmentsandContingenciesNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CommitmentsandContingenciesNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CommitmentsandContingenciesNotes" xlink:type="extended" id="ib4b1b590d2eb48ed8202a629bccdbcf6_CommitmentsandContingenciesNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail" xlink:type="simple" xlink:href="mtrx-20210331.xsd#CommitmentsandContingenciesAdditionalInformationDetail"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/CommitmentsandContingenciesAdditionalInformationDetail" xlink:type="extended" id="icd6d88c8cccb4ad5b02876303cc44273_CommitmentsandContingenciesAdditionalInformationDetail">
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsLineItems_494d6bcb-e546-4cd1-9216-f71cd7cc8b69" xlink:href="mtrx-20210331.xsd#mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnapprovedChangeOrdersAmount_f57e299e-b112-45c3-8bf6-b4ccc935b016" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_UnapprovedChangeOrdersAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsLineItems_494d6bcb-e546-4cd1-9216-f71cd7cc8b69" xlink:to="loc_us-gaap_UnapprovedChangeOrdersAmount_f57e299e-b112-45c3-8bf6-b4ccc935b016" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsTable_b8021789-0c4c-473f-9881-68582f57446e" xlink:href="mtrx-20210331.xsd#mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsLineItems_494d6bcb-e546-4cd1-9216-f71cd7cc8b69" xlink:to="loc_mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsTable_b8021789-0c4c-473f-9881-68582f57446e" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_PowerGenerationProjectAxis_40d9adac-238f-4afc-b231-d3288cbfd77d" xlink:href="mtrx-20210331.xsd#mtrx_PowerGenerationProjectAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_mtrx_PowerGenerationProjectUnapprovedChangeOrdersandClaimsTable_b8021789-0c4c-473f-9881-68582f57446e" xlink:to="loc_mtrx_PowerGenerationProjectAxis_40d9adac-238f-4afc-b231-d3288cbfd77d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_PowerGenerationProjectDomain_40d9adac-238f-4afc-b231-d3288cbfd77d_default" xlink:href="mtrx-20210331.xsd#mtrx_PowerGenerationProjectDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_mtrx_PowerGenerationProjectAxis_40d9adac-238f-4afc-b231-d3288cbfd77d" xlink:to="loc_mtrx_PowerGenerationProjectDomain_40d9adac-238f-4afc-b231-d3288cbfd77d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_PowerGenerationProjectDomain_00b81049-ee5b-4618-87cd-09099ea5b81c" xlink:href="mtrx-20210331.xsd#mtrx_PowerGenerationProjectDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_mtrx_PowerGenerationProjectAxis_40d9adac-238f-4afc-b231-d3288cbfd77d" xlink:to="loc_mtrx_PowerGenerationProjectDomain_00b81049-ee5b-4618-87cd-09099ea5b81c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UnapprovedChangeOrdersOnPowerGenerationProjectMember_3b7f51a8-09b8-4bd6-a459-8adfdd844608" xlink:href="mtrx-20210331.xsd#mtrx_UnapprovedChangeOrdersOnPowerGenerationProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_PowerGenerationProjectDomain_00b81049-ee5b-4618-87cd-09099ea5b81c" xlink:to="loc_mtrx_UnapprovedChangeOrdersOnPowerGenerationProjectMember_3b7f51a8-09b8-4bd6-a459-8adfdd844608" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_ClaimOnPowerGenerationProjectMember_2a067246-e375-4e30-a07a-ffff141b2887" xlink:href="mtrx-20210331.xsd#mtrx_ClaimOnPowerGenerationProjectMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtrx_PowerGenerationProjectDomain_00b81049-ee5b-4618-87cd-09099ea5b81c" xlink:to="loc_mtrx_ClaimOnPowerGenerationProjectMember_2a067246-e375-4e30-a07a-ffff141b2887" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingenciesLineItems_ed43bada-caff-4c70-8249-00b47fb4edc5" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LossContingenciesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ContractsReceivableClaimsAndUncertainAmounts_e716ad92-8fe4-4feb-8178-efae2544f105" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractsReceivableClaimsAndUncertainAmounts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LossContingenciesLineItems_ed43bada-caff-4c70-8249-00b47fb4edc5" xlink:to="loc_us-gaap_ContractsReceivableClaimsAndUncertainAmounts_e716ad92-8fe4-4feb-8178-efae2544f105" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossContingenciesTable_6657f78f-81e6-451d-975f-6f92d5451c21" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LossContingenciesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LossContingenciesLineItems_ed43bada-caff-4c70-8249-00b47fb4edc5" xlink:to="loc_us-gaap_LossContingenciesTable_6657f78f-81e6-451d-975f-6f92d5451c21" xlink:type="arc" order="2" xbrldt:closed="true" xbrldt:contextElement="segment"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsperCommonShareNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#EarningsperCommonShareNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EarningsperCommonShareNotes" xlink:type="extended" id="i6b97bbb63c4b49729f3e2b09963faa1a_EarningsperCommonShareNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsperCommonShareTables" xlink:type="simple" xlink:href="mtrx-20210331.xsd#EarningsperCommonShareTables"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EarningsperCommonShareTables" xlink:type="extended" id="i23b8945ae075439fa54ae1a5f7bac140_EarningsperCommonShareTables"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails" xlink:type="extended" id="icc79caa20a1e4002a61934edf7cc7018_EarningsperCommonShareComputationofBasicandDilutedEarningsPerShareDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicLineItems_de200840-ffa4-40aa-abe4-9023716239ff" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EarningsPerShareBasicLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_3384a164-5b4d-4da1-b4ee-39f9dc4747fa" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_de200840-ffa4-40aa-abe4-9023716239ff" xlink:to="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_3384a164-5b4d-4da1-b4ee-39f9dc4747fa" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_27bfd534-bf34-4cab-8434-da9cf9886da9" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_3384a164-5b4d-4da1-b4ee-39f9dc4747fa" xlink:to="loc_us-gaap_StatementClassOfStockAxis_27bfd534-bf34-4cab-8434-da9cf9886da9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_27bfd534-bf34-4cab-8434-da9cf9886da9_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_27bfd534-bf34-4cab-8434-da9cf9886da9" xlink:to="loc_us-gaap_ClassOfStockDomain_27bfd534-bf34-4cab-8434-da9cf9886da9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_74f33342-083a-447e-ab66-08efd71f914d" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_27bfd534-bf34-4cab-8434-da9cf9886da9" xlink:to="loc_us-gaap_ClassOfStockDomain_74f33342-083a-447e-ab66-08efd71f914d" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails" xlink:type="extended" id="i7e965c5abeab4e9da4f91476624a4533_EarningsperCommonShareAntidilutiveSecuritiesExcludedfromtheCalculationofDilutedEarningsPerShareDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_82cbfbf1-e5b5-4c23-a515-1bedd09e7202" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_9af472e5-c591-484e-aef1-e266918124e5" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_82cbfbf1-e5b5-4c23-a515-1bedd09e7202" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_9af472e5-c591-484e-aef1-e266918124e5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_04df3434-3184-4ff4-ae97-b0a236afec3b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_82cbfbf1-e5b5-4c23-a515-1bedd09e7202" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_04df3434-3184-4ff4-ae97-b0a236afec3b" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_96631660-0c7b-42dd-a180-67b6b38957f9" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_04df3434-3184-4ff4-ae97-b0a236afec3b" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_96631660-0c7b-42dd-a180-67b6b38957f9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_96631660-0c7b-42dd-a180-67b6b38957f9_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_96631660-0c7b-42dd-a180-67b6b38957f9" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_96631660-0c7b-42dd-a180-67b6b38957f9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_c64fa634-69cd-4d73-9d22-6966b3d52e77" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_96631660-0c7b-42dd-a180-67b6b38957f9" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_c64fa634-69cd-4d73-9d22-6966b3d52e77" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_a991b850-e2da-42d7-bb7d-6decd2bc9d8c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_c64fa634-69cd-4d73-9d22-6966b3d52e77" xlink:to="loc_us-gaap_EmployeeStockOptionMember_a991b850-e2da-42d7-bb7d-6decd2bc9d8c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_NonvestedDeferredSharesMember_46f7d9da-0164-4af8-aac4-d5e829490405" xlink:href="mtrx-20210331.xsd#mtrx_NonvestedDeferredSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_c64fa634-69cd-4d73-9d22-6966b3d52e77" xlink:to="loc_mtrx_NonvestedDeferredSharesMember_46f7d9da-0164-4af8-aac4-d5e829490405" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#SegmentInformationNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformationNotes" xlink:type="extended" id="i662deeacf26d4591a7a6b5b8e68befc1_SegmentInformationNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationTables" xlink:type="simple" xlink:href="mtrx-20210331.xsd#SegmentInformationTables"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformationTables" xlink:type="extended" id="i6fb4c6544de04305ace4d9cc3627ee4d_SegmentInformationTables"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/SegmentInformationDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#SegmentInformationDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/SegmentInformationDetails" xlink:type="extended" id="if1bb2bac1eec4a9e89f6b5dc7178fa63_SegmentInformationDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_Grossrevenues_60bf492e-29b8-4e95-b99e-3b2f88a56f57" xlink:href="mtrx-20210331.xsd#mtrx_Grossrevenues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:to="loc_mtrx_Grossrevenues_60bf492e-29b8-4e95-b99e-3b2f88a56f57" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_e484dbfa-e89b-4ddb-a7d3-2868de02b426" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Revenues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:to="loc_us-gaap_Revenues_e484dbfa-e89b-4ddb-a7d3-2868de02b426" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_9ea6e1d8-655b-4db3-8b4b-f1adb847fb3c" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GrossProfit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:to="loc_us-gaap_GrossProfit_9ea6e1d8-655b-4db3-8b4b-f1adb847fb3c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_f59eaf0b-20bf-4d1d-adcb-08ab2e2a8a99" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_f59eaf0b-20bf-4d1d-adcb-08ab2e2a8a99" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringSettlementAndImpairmentProvisions_3f6bb4dd-52ce-4cd1-b032-e69adde697be" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RestructuringSettlementAndImpairmentProvisions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:to="loc_us-gaap_RestructuringSettlementAndImpairmentProvisions_3f6bb4dd-52ce-4cd1-b032-e69adde697be" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_dc6fc370-3d3c-4673-a6fd-8fb578c050c5" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:to="loc_us-gaap_OperatingIncomeLoss_dc6fc370-3d3c-4673-a6fd-8fb578c050c5" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_f2c789f8-2abc-4c55-af6d-632d2fea61f5" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:to="loc_us-gaap_Assets_f2c789f8-2abc-4c55-af6d-632d2fea61f5" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_5cfd181e-901a-44c4-9292-1205dd17e6cc" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_adcd2d55-4e2b-47d2-85a6-66b7a1a0981b" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_5cfd181e-901a-44c4-9292-1205dd17e6cc" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_0ade0708-9b57-4c9e-83ab-4242a388331d" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_5cfd181e-901a-44c4-9292-1205dd17e6cc" xlink:to="loc_srt_ConsolidationItemsAxis_0ade0708-9b57-4c9e-83ab-4242a388331d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_0ade0708-9b57-4c9e-83ab-4242a388331d_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_0ade0708-9b57-4c9e-83ab-4242a388331d" xlink:to="loc_srt_ConsolidationItemsDomain_0ade0708-9b57-4c9e-83ab-4242a388331d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_b4138563-db22-4934-8561-c64f3787dca5" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_0ade0708-9b57-4c9e-83ab-4242a388331d" xlink:to="loc_srt_ConsolidationItemsDomain_b4138563-db22-4934-8561-c64f3787dca5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntersegmentEliminationMember_4e95be01-a61d-4033-be61-86323b83dc88" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IntersegmentEliminationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_b4138563-db22-4934-8561-c64f3787dca5" xlink:to="loc_us-gaap_IntersegmentEliminationMember_4e95be01-a61d-4033-be61-86323b83dc88" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_5a400d30-886d-4222-984b-20da1048e7b7" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_5cfd181e-901a-44c4-9292-1205dd17e6cc" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_5a400d30-886d-4222-984b-20da1048e7b7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_5a400d30-886d-4222-984b-20da1048e7b7_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_5a400d30-886d-4222-984b-20da1048e7b7" xlink:to="loc_us-gaap_SegmentDomain_5a400d30-886d-4222-984b-20da1048e7b7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_8e831320-14d2-49f6-9398-f8ac26235648" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_5a400d30-886d-4222-984b-20da1048e7b7" xlink:to="loc_us-gaap_SegmentDomain_8e831320-14d2-49f6-9398-f8ac26235648" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UtilityAndPowerInfrastructureMember_51950f09-e4db-4f4e-94d3-f760a662088b" xlink:href="mtrx-20210331.xsd#mtrx_UtilityAndPowerInfrastructureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_8e831320-14d2-49f6-9398-f8ac26235648" xlink:to="loc_mtrx_UtilityAndPowerInfrastructureMember_51950f09-e4db-4f4e-94d3-f760a662088b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_ProcessAndIndustrialFacilitiesMember_93df2719-aa01-4a7b-9df4-8c054500c041" xlink:href="mtrx-20210331.xsd#mtrx_ProcessAndIndustrialFacilitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_8e831320-14d2-49f6-9398-f8ac26235648" xlink:to="loc_mtrx_ProcessAndIndustrialFacilitiesMember_93df2719-aa01-4a7b-9df4-8c054500c041" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_StorageAndTerminalSolutionsMember_ee1f66db-756a-4bbe-96ce-5b83a32134f4" xlink:href="mtrx-20210331.xsd#mtrx_StorageAndTerminalSolutionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_8e831320-14d2-49f6-9398-f8ac26235648" xlink:to="loc_mtrx_StorageAndTerminalSolutionsMember_ee1f66db-756a-4bbe-96ce-5b83a32134f4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UnallocatedCorporateCostsMember_d4c89928-bd2d-4ef7-b945-bee5fa57af9a" xlink:href="mtrx-20210331.xsd#mtrx_UnallocatedCorporateCostsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_8e831320-14d2-49f6-9398-f8ac26235648" xlink:to="loc_mtrx_UnallocatedCorporateCostsMember_d4c89928-bd2d-4ef7-b945-bee5fa57af9a" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RestructuringCostsNotes" xlink:type="simple" xlink:href="mtrx-20210331.xsd#RestructuringCostsNotes"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RestructuringCostsNotes" xlink:type="extended" id="i8738fd8715c74fbdab1af9b81dbf57c5_RestructuringCostsNotes"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RestructuringCostsTables" xlink:type="simple" xlink:href="mtrx-20210331.xsd#RestructuringCostsTables"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RestructuringCostsTables" xlink:type="extended" id="icfbbf33e3bd04d668d1d48e25795d07e_RestructuringCostsTables"/>
  <link:roleRef roleURI="http://www.matrixservicecompany.com/role/RestructuringCostsDetails" xlink:type="simple" xlink:href="mtrx-20210331.xsd#RestructuringCostsDetails"/>
  <link:definitionLink xlink:role="http://www.matrixservicecompany.com/role/RestructuringCostsDetails" xlink:type="extended" id="i0ee15dbaf7294582a52d21faf10ed5ed_RestructuringCostsDetails">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_RestructuringcostsbytypeAbstract_301ce91f-b393-41ab-b93b-8efcb1ab6b8c" xlink:href="mtrx-20210331.xsd#mtrx_RestructuringcostsbytypeAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_mtrx_RestructuringcostsbytypeAbstract_301ce91f-b393-41ab-b93b-8efcb1ab6b8c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeveranceCosts1_6dfca3ee-0084-421f-b3ae-f64b35bd8111" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SeveranceCosts1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_SeveranceCosts1_6dfca3ee-0084-421f-b3ae-f64b35bd8111" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessExitCosts1_dd349888-bf05-463d-a301-c11e77a84af9" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessExitCosts1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_BusinessExitCosts1_dd349888-bf05-463d-a301-c11e77a84af9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_2eb47f66-a424-4dfd-9425-d532dbc65284" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ImpairmentOfIntangibleAssetsFinitelived"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_2eb47f66-a424-4dfd-9425-d532dbc65284" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherRestructuringCosts_bf0fee5f-8aec-440f-9d02-aa04255c3964" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherRestructuringCosts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_OtherRestructuringCosts_bf0fee5f-8aec-440f-9d02-aa04255c3964" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_84158857-20cc-46a7-8d63-5c281d617e5f" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_RestructuringCharges_84158857-20cc-46a7-8d63-5c281d617e5f" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringAndRelatedCostExpectedCostRemaining1_26f4650d-cde1-4db7-a053-968f4535d98a" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RestructuringAndRelatedCostExpectedCostRemaining1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedCostRemaining1_26f4650d-cde1-4db7-a053-968f4535d98a" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_RestructuringcostsreserveRollForward_0ee71d58-4890-45bd-b175-85e895ccd59a" xlink:href="mtrx-20210331.xsd#mtrx_RestructuringcostsreserveRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_mtrx_RestructuringcostsreserveRollForward_0ee71d58-4890-45bd-b175-85e895ccd59a" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringReserve_9d72653b-e5da-4b84-8492-bc2ca9a4fb08" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RestructuringReserve"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_RestructuringReserve_9d72653b-e5da-4b84-8492-bc2ca9a4fb08" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MtrxUnpaidRestructuringCharges_f218bc94-7210-4787-aecd-61defec02dcc" xlink:href="mtrx-20210331.xsd#mtrx_MtrxUnpaidRestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_mtrx_MtrxUnpaidRestructuringCharges_f218bc94-7210-4787-aecd-61defec02dcc" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRestructuring_d0705a86-692c-4d01-bc07-c8c2b7bfc52b" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PaymentsForRestructuring"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_PaymentsForRestructuring_d0705a86-692c-4d01-bc07-c8c2b7bfc52b" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MtrxAdjustmentToRestructuringCostsLiability_0dc2b244-1fd4-4c0d-ac76-500a8307b4d7" xlink:href="mtrx-20210331.xsd#mtrx_MtrxAdjustmentToRestructuringCostsLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_mtrx_MtrxAdjustmentToRestructuringCostsLiability_0dc2b244-1fd4-4c0d-ac76-500a8307b4d7" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherRestructuringCosts_711345d2-80c4-46cc-881f-62a86f0d7619" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherRestructuringCosts"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_34a075fc-7394-4853-944e-28e5b785ff05" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_059a0c80-69e6-432f-8f6c-7a2d8ff9c188" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_34a075fc-7394-4853-944e-28e5b785ff05" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_4fe43e2d-fe18-4412-a143-f0788b6d6859" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_34a075fc-7394-4853-944e-28e5b785ff05" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_4fe43e2d-fe18-4412-a143-f0788b6d6859" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_4fe43e2d-fe18-4412-a143-f0788b6d6859_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_4fe43e2d-fe18-4412-a143-f0788b6d6859" xlink:to="loc_us-gaap_SegmentDomain_4fe43e2d-fe18-4412-a143-f0788b6d6859_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_db52f14d-7916-41af-b498-808ee2287ddb" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_4fe43e2d-fe18-4412-a143-f0788b6d6859" xlink:to="loc_us-gaap_SegmentDomain_db52f14d-7916-41af-b498-808ee2287ddb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UtilityAndPowerInfrastructureMember_b83f38c6-1a2e-4db6-b8e3-b185746c52fd" xlink:href="mtrx-20210331.xsd#mtrx_UtilityAndPowerInfrastructureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_db52f14d-7916-41af-b498-808ee2287ddb" xlink:to="loc_mtrx_UtilityAndPowerInfrastructureMember_b83f38c6-1a2e-4db6-b8e3-b185746c52fd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_ProcessAndIndustrialFacilitiesMember_d6d76391-92ac-4df1-838f-4ca66218f125" xlink:href="mtrx-20210331.xsd#mtrx_ProcessAndIndustrialFacilitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_db52f14d-7916-41af-b498-808ee2287ddb" xlink:to="loc_mtrx_ProcessAndIndustrialFacilitiesMember_d6d76391-92ac-4df1-838f-4ca66218f125" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_StorageAndTerminalSolutionsMember_e5564a73-0da0-43d9-9b24-c50b319d8525" xlink:href="mtrx-20210331.xsd#mtrx_StorageAndTerminalSolutionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_db52f14d-7916-41af-b498-808ee2287ddb" xlink:to="loc_mtrx_StorageAndTerminalSolutionsMember_e5564a73-0da0-43d9-9b24-c50b319d8525" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_UnallocatedCorporateCostsMember_b21742c1-375f-4f83-a370-afde2e49c6c0" xlink:href="mtrx-20210331.xsd#mtrx_UnallocatedCorporateCostsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_db52f14d-7916-41af-b498-808ee2287ddb" xlink:to="loc_mtrx_UnallocatedCorporateCostsMember_b21742c1-375f-4f83-a370-afde2e49c6c0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanAxis_d4eade51-ad3f-4e2b-b507-886c9f877cba" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RestructuringPlanAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_34a075fc-7394-4853-944e-28e5b785ff05" xlink:to="loc_us-gaap_RestructuringPlanAxis_d4eade51-ad3f-4e2b-b507-886c9f877cba" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_d4eade51-ad3f-4e2b-b507-886c9f877cba_default" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_d4eade51-ad3f-4e2b-b507-886c9f877cba" xlink:to="loc_us-gaap_RestructuringPlanDomain_d4eade51-ad3f-4e2b-b507-886c9f877cba_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_98299e59-1230-4a79-a37c-b5c24e3bb126" xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_d4eade51-ad3f-4e2b-b507-886c9f877cba" xlink:to="loc_us-gaap_RestructuringPlanDomain_98299e59-1230-4a79-a37c-b5c24e3bb126" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MtrxBusinessImprovementPlanMember_b2ae01c2-1db7-4768-ab4c-c4b37f0f29b0" xlink:href="mtrx-20210331.xsd#mtrx_MtrxBusinessImprovementPlanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_98299e59-1230-4a79-a37c-b5c24e3bb126" xlink:to="loc_mtrx_MtrxBusinessImprovementPlanMember_b2ae01c2-1db7-4768-ab4c-c4b37f0f29b0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtrx_MtrxCostReductionPlanMember_2274c52d-bd27-46d9-8041-3b5933ea1e62" xlink:href="mtrx-20210331.xsd#mtrx_MtrxCostReductionPlanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_98299e59-1230-4a79-a37c-b5c24e3bb126" xlink:to="loc_mtrx_MtrxCostReductionPlanMember_2274c52d-bd27-46d9-8041-3b5933ea1e62" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_322e173f-ef7d-43e2-be5a-188e6e709aa4" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_34a075fc-7394-4853-944e-28e5b785ff05" xlink:to="loc_srt_RangeAxis_322e173f-ef7d-43e2-be5a-188e6e709aa4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_322e173f-ef7d-43e2-be5a-188e6e709aa4_default" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_322e173f-ef7d-43e2-be5a-188e6e709aa4" xlink:to="loc_srt_RangeMember_322e173f-ef7d-43e2-be5a-188e6e709aa4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_00a97581-7706-4ffb-a4ff-cd6fbb41d98b" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_322e173f-ef7d-43e2-be5a-188e6e709aa4" xlink:to="loc_srt_RangeMember_00a97581-7706-4ffb-a4ff-cd6fbb41d98b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_3d0a8fc2-3a56-4747-85ae-3d83d77ae4d5" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_00a97581-7706-4ffb-a4ff-cd6fbb41d98b" xlink:to="loc_srt_MinimumMember_3d0a8fc2-3a56-4747-85ae-3d83d77ae4d5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_6d981d00-a095-4750-9ac6-ecf3a96cb7e7" xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_00a97581-7706-4ffb-a4ff-cd6fbb41d98b" xlink:to="loc_srt_MaximumMember_6d981d00-a095-4750-9ac6-ecf3a96cb7e7" xlink:type="arc" order="1"/>
  </link:definitionLink>
</link:linkbase>
