<?xml version="1.0" encoding="US-ASCII"?>
<!-- Generated by CompSci Transform (tm) - http://www.compsciresources.com -->
<!-- Created: Mon Mar 30 16:14:59 UTC 2026 -->
<linkbase xmlns="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:xbrldt="http://xbrl.org/2005/xbrldt">
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ConsolidatedBalanceSheet" roleURI="http://www.rexamerican.com/role/ConsolidatedBalanceSheet"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ConsolidatedBalanceSheet_Parentheticals" roleURI="http://www.rexamerican.com/role/ConsolidatedBalanceSheet_Parentheticals"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ConsolidatedIncomeStatement" roleURI="http://www.rexamerican.com/role/ConsolidatedIncomeStatement"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ConsolidatedIncomeStatement_Parentheticals" roleURI="http://www.rexamerican.com/role/ConsolidatedIncomeStatement_Parentheticals"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ShareholdersEquityType2or3" roleURI="http://www.rexamerican.com/role/ShareholdersEquityType2or3"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ConsolidatedCashFlow" roleURI="http://www.rexamerican.com/role/ConsolidatedCashFlow"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIES" roleURI="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_NETSALESANDREVENUE" roleURI="http://www.rexamerican.com/role/NETSALESANDREVENUE"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_INVESTMENTS" roleURI="http://www.rexamerican.com/role/INVESTMENTS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_FAIRVALUE" roleURI="http://www.rexamerican.com/role/FAIRVALUE"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_OTHERASSETS" roleURI="http://www.rexamerican.com/role/OTHERASSETS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIES" roleURI="http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_LEASES" roleURI="http://www.rexamerican.com/role/LEASES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_COMMONSTOCK" roleURI="http://www.rexamerican.com/role/COMMONSTOCK"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_DERIVATIVEFINANCIALINSTRUMENTS" roleURI="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_EMPLOYEEBENEFITS" roleURI="http://www.rexamerican.com/role/EMPLOYEEBENEFITS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_COMMITMENTS" roleURI="http://www.rexamerican.com/role/COMMITMENTS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_INCOMETAXES" roleURI="http://www.rexamerican.com/role/INCOMETAXES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_CONTINGENCIES" roleURI="http://www.rexamerican.com/role/CONTINGENCIES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_RELATEDPARTIES" roleURI="http://www.rexamerican.com/role/RELATEDPARTIES"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_SEGMENTREPORTING" roleURI="http://www.rexamerican.com/role/SEGMENTREPORTING"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleIIVALUATIONANDQUALIFYINGACCOUNTS" roleURI="http://www.rexamerican.com/role/ScheduleIIVALUATIONANDQUALIFYINGACCOUNTS"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_AccountingPoliciesByPolicy" roleURI="http://www.rexamerican.com/role/AccountingPoliciesByPolicy"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables" roleURI="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_NETSALESANDREVENUETables" roleURI="http://www.rexamerican.com/role/NETSALESANDREVENUETables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_INVESTMENTSTables" roleURI="http://www.rexamerican.com/role/INVESTMENTSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_FAIRVALUETables" roleURI="http://www.rexamerican.com/role/FAIRVALUETables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_OTHERASSETSTables" roleURI="http://www.rexamerican.com/role/OTHERASSETSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIESTables" roleURI="http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIESTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_LEASESTables" roleURI="http://www.rexamerican.com/role/LEASESTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_COMMONSTOCKTables" roleURI="http://www.rexamerican.com/role/COMMONSTOCKTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_DERIVATIVEFINANCIALINSTRUMENTSTables" roleURI="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_EMPLOYEEBENEFITSTables" roleURI="http://www.rexamerican.com/role/EMPLOYEEBENEFITSTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_INCOMETAXESTables" roleURI="http://www.rexamerican.com/role/INCOMETAXESTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_SEGMENTREPORTINGTables" roleURI="http://www.rexamerican.com/role/SEGMENTREPORTINGTables"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofInventoryTable" roleURI="http://www.rexamerican.com/role/ScheduleofInventoryTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofPropertyandEquipmentTable" roleURI="http://www.rexamerican.com/role/ScheduleofPropertyandEquipmentTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofDisaggregatedRevenuebyProductTable" roleURI="http://www.rexamerican.com/role/ScheduleofDisaggregatedRevenuebyProductTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofEquityMethodInvestmentsTable" roleURI="http://www.rexamerican.com/role/ScheduleofEquityMethodInvestmentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_SummarizedFinancialInformationforEquityMethodInvesteeTable" roleURI="http://www.rexamerican.com/role/SummarizedFinancialInformationforEquityMethodInvesteeTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofFinancialInformationforEquityMethodInvestmentsTable" roleURI="http://www.rexamerican.com/role/ScheduleofFinancialInformationforEquityMethodInvestmentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable" roleURI="http://www.rexamerican.com/role/ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofOtherAssetsTable" roleURI="http://www.rexamerican.com/role/ScheduleofOtherAssetsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofAccruedExpensesandOtherCurrentLiabilitiesTable" roleURI="http://www.rexamerican.com/role/ScheduleofAccruedExpensesandOtherCurrentLiabilitiesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleofLeaseCostTable" roleURI="http://www.rexamerican.com/role/ScheduleofLeaseCostTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_FutureMinimumRentalPaymentsforOperatingLeasesTable" roleURI="http://www.rexamerican.com/role/FutureMinimumRentalPaymentsforOperatingLeasesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_FutureMinimumRentalPaymentsforFinancingLeasesTable" roleURI="http://www.rexamerican.com/role/FutureMinimumRentalPaymentsforFinancingLeasesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_InformationRegardingtheCommonStockTable" roleURI="http://www.rexamerican.com/role/InformationRegardingtheCommonStockTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_FairValuesforDerivativeFinancialInstrumentsTable" roleURI="http://www.rexamerican.com/role/FairValuesforDerivativeFinancialInstrumentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_InformationAboutLossesGainsRecognizedinIncomeonDerivativeFinancialInstrumentsTable" roleURI="http://www.rexamerican.com/role/InformationAboutLossesGainsRecognizedinIncomeonDerivativeFinancialInstrumentsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_NonVestedRestrictedStockAwardActivityTable" roleURI="http://www.rexamerican.com/role/NonVestedRestrictedStockAwardActivityTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_DilutedWeightedAverageSharesTable" roleURI="http://www.rexamerican.com/role/DilutedWeightedAverageSharesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ProvisionforIncomeTaxesTable" roleURI="http://www.rexamerican.com/role/ProvisionforIncomeTaxesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_DeferredTaxAssetsandLiabilitiesTable" roleURI="http://www.rexamerican.com/role/DeferredTaxAssetsandLiabilitiesTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_IncomeTaxesPaidTable" roleURI="http://www.rexamerican.com/role/IncomeTaxesPaidTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_IncomeTaxesPaidNetofRefundsTable" roleURI="http://www.rexamerican.com/role/IncomeTaxesPaidNetofRefundsTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ReconciliationsofIncomeTaxBenefitProvisionTable" roleURI="http://www.rexamerican.com/role/ReconciliationsofIncomeTaxBenefitProvisionTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_UnrecognizedTaxBenefitsRollForwardTable" roleURI="http://www.rexamerican.com/role/UnrecognizedTaxBenefitsRollForwardTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_UnrecognizedTaxBenefitConsolidatedBalanceSheetTable" roleURI="http://www.rexamerican.com/role/UnrecognizedTaxBenefitConsolidatedBalanceSheetTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ReportableSegmentTable" roleURI="http://www.rexamerican.com/role/ReportableSegmentTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_ScheduleIIVALUATIONANDQUALIFYINGACCOUNTSTable" roleURI="http://www.rexamerican.com/role/ScheduleIIVALUATIONANDQUALIFYINGACCOUNTSTable"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetails" roleURI="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_NETSALESANDREVENUEDetails" roleURI="http://www.rexamerican.com/role/NETSALESANDREVENUEDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_INVESTMENTSDetails" roleURI="http://www.rexamerican.com/role/INVESTMENTSDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_FAIRVALUEDetails" roleURI="http://www.rexamerican.com/role/FAIRVALUEDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_LEASESDetails" roleURI="http://www.rexamerican.com/role/LEASESDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_COMMONSTOCKDetails" roleURI="http://www.rexamerican.com/role/COMMONSTOCKDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_DERIVATIVEFINANCIALINSTRUMENTSDetails" roleURI="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_EMPLOYEEBENEFITSDetails" roleURI="http://www.rexamerican.com/role/EMPLOYEEBENEFITSDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_COMMITMENTSDetails" roleURI="http://www.rexamerican.com/role/COMMITMENTSDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_INCOMETAXESDetails" roleURI="http://www.rexamerican.com/role/INCOMETAXESDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_CONTINGENCIESDetails" roleURI="http://www.rexamerican.com/role/CONTINGENCIESDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_RELATEDPARTIESDetails" roleURI="http://www.rexamerican.com/role/RELATEDPARTIESDetails"/>
  <roleRef xlink:type="simple" xlink:href="rex-20260131.xsd#rex_r_SEGMENTREPORTINGDetails" roleURI="http://www.rexamerican.com/role/SEGMENTREPORTINGDetails"/>
  <roleRef xlink:type="simple" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-roles-2026.xsd#eedm1" roleURI="http://fasb.org/srt/role/srt-eedm/ExtensibleEnumerationLists"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member"/>
  <arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" arcroleURI="http://xbrl.org/int/dim/arcrole/all"/>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedBalanceSheet" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementOfFinancialPositionAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementOfFinancialPositionAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_CashAndCashEquivalentsAtCarryingValue" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShortTermInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_ShortTermInvestments" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsReceivableNetCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_AccountsReceivableNetCurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_InventoryNet" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxesReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_IncomeTaxesReceivable" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_AssetsCurrent" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentNet" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseRightOfUseAsset" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_OperatingLeaseRightOfUseAsset" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseRightOfUseAsset" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_FinanceLeaseRightOfUseAsset" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_OtherAssetsNoncurrent" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_EquityMethodInvestments" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Assets" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_Assets" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableTradeCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableTradeCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_AccountsPayableTradeCurrent" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseLiabilityCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_OperatingLeaseLiabilityCurrent" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityCurrent" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_AccruedLiabilitiesCurrent" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_LiabilitiesCurrent" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxLiabilitiesNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_DeferredIncomeTaxLiabilitiesNet" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseLiabilityNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_OperatingLeaseLiabilityNoncurrent" order="19" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityNoncurrent" order="20" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_TaxesPayableNoncurrent" xlink:href="rex-20260131.xsd#rex_TaxesPayableNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="rex_TaxesPayableNoncurrent" order="21" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherLiabilitiesNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_OtherLiabilitiesNoncurrent" order="22" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_LiabilitiesNoncurrent" order="23" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommitmentsAndContingencies" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsAndContingencies"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_CommitmentsAndContingencies" order="24" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_CommonStockValue" order="25" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AdditionalPaidInCapitalCommonStock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_AdditionalPaidInCapitalCommonStock" order="26" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RetainedEarningsAccumulatedDeficit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_RetainedEarningsAccumulatedDeficit" order="27" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquity" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_StockholdersEquity" order="28" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MinorityInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MinorityInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_MinorityInterest" order="29" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" order="30" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesAndStockholdersEquity" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfFinancialPositionAbstract" xlink:to="us-gaap_LiabilitiesAndStockholdersEquity" order="31" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedBalanceSheet_Parentheticals" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_RelatedPartyTransactionAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionAxis" xlink:to="us-gaap_RelatedPartyTransactionDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionAxis" xlink:to="us-gaap_RelatedPartyTransactionDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionDomain" xlink:to="us-gaap_RelatedPartyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AccountsPayableCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockParOrStatedValuePerShare" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockParOrStatedValuePerShare"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CommonStockParOrStatedValuePerShare" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesAuthorized" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CommonStockSharesAuthorized" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesIssued" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockSharesIssued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CommonStockSharesIssued" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedIncomeStatement" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeStatementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeStatementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfGoodsAndServicesSold" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_CostOfGoodsAndServicesSold" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_GrossProfit" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SellingGeneralAndAdministrativeExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_SellingGeneralAndAdministrativeExpense" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InterestAndOtherIncome" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InterestAndOtherIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_InterestAndOtherIncome" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossAttributableToParent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_IncomeLossAttributableToParent" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetInvestmentIncome" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetInvestmentIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_NetInvestmentIncome" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_NetIncomeLossAvailableToCommonStockholdersBasic" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EarningsPerShareBasic" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EarningsPerShareBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_EarningsPerShareBasic" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EarningsPerShareDiluted" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EarningsPerShareDiluted"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_EarningsPerShareDiluted" order="14" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedIncomeStatement_Parentheticals" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeStatementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeStatementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartiesAmountInCostOfSales" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartiesAmountInCostOfSales"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementAbstract" xlink:to="us-gaap_RelatedPartiesAmountInCostOfSales" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ShareholdersEquityType2or3" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementEquityComponentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementEquityComponentsAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityComponentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityComponentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_CommonStockMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AdditionalPaidInCapitalMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AdditionalPaidInCapitalMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RetainedEarningsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RetainedEarningsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_RetainedEarningsMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NoncontrollingInterestMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoncontrollingInterestMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_NoncontrollingInterestMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SharesOutstanding" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_SharesOutstanding" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProfitLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProfitLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ProfitLoss" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NoncontrollingInterestIncreaseFromSaleOfParentEquityInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NoncontrollingInterestIncreaseFromSaleOfParentEquityInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_NoncontrollingInterestIncreaseFromSaleOfParentEquityInterest" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_MinorityInterestDecreaseFromDistributionsToNoncontrollingInterestHolders" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockSharesAcquired" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_TreasuryStockSharesAcquired" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TreasuryStockValueAcquiredCostMethod" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_TreasuryStockValueAcquiredCostMethod" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockRepurchasedAndRetiredDuringPeriodShares" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockRepurchasedAndRetiredDuringPeriodShares"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockRepurchasedAndRetiredDuringPeriodShares" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockRepurchasedAndRetiredDuringPeriodValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockRepurchasedAndRetiredDuringPeriodValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockRepurchasedAndRetiredDuringPeriodValue" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CorrectionToEquityAwardsAndStockbasedCompensationExpenseSharesinShares" xlink:href="rex-20260131.xsd#rex_CorrectionToEquityAwardsAndStockbasedCompensationExpenseSharesinShares"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_CorrectionToEquityAwardsAndStockbasedCompensationExpenseSharesinShares" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CorrectionToEquityAwardsAndStockbasedCompensationExpense" xlink:href="rex-20260131.xsd#rex_CorrectionToEquityAwardsAndStockbasedCompensationExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="rex_CorrectionToEquityAwardsAndStockbasedCompensationExpense" order="10" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ConsolidatedCashFlow" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_StatementOfCashFlowsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementOfCashFlowsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetInvestmentIncome" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetInvestmentIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_NetInvestmentIncome" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DepreciationDepletionAndAmortization" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_DepreciationDepletionAndAmortization" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NoncashOperatingLeaseExpense" xlink:href="rex-20260131.xsd#rex_NoncashOperatingLeaseExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NoncashOperatingLeaseExpense" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseRightOfUseAssetAmortization" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseRightOfUseAssetAmortization"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_FinanceLeaseRightOfUseAssetAmortization" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AllocatedShareBasedCompensationExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_AllocatedShareBasedCompensationExpense" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentDividendsOrDistributions" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentDividendsOrDistributions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_EquityMethodInvestmentDividendsOrDistributions" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromInterestAndDividendsReceived" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromInterestAndDividendsReceived"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_ProceedsFromInterestAndDividendsReceived" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnSaleOfPropertyPlantEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_GainLossOnSaleOfPropertyPlantEquipment" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_DeferredIncomeTaxExpenseBenefit" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccountsReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInAccountsReceivable" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInInventories" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInInventories"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInInventories" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInPrepaidExpensesOther" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInPrepaidExpensesOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInPrepaidExpensesOther" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInIncomeTaxesReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInIncomeTaxesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInIncomeTaxesReceivable" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccountsPayableTrade" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccountsPayableTrade"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInAccountsPayableTrade" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInAccruedIncomeTaxesPayable" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncreaseDecreaseInOtherOperatingLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_IncreaseDecreaseInOtherOperatingLiabilities" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInOperatingActivities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_NetCashProvidedByUsedInOperatingActivities" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireShortTermInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsToAcquireShortTermInvestments" order="19" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfShortTermInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleOfShortTermInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_ProceedsFromSaleOfShortTermInvestments" order="20" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment" order="21" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsForOtherDeposits" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForOtherDeposits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsForOtherDeposits" order="22" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_NetCashProvidedByUsedInInvestingActivities" order="23" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsForRepurchaseOfCommonStock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsForRepurchaseOfCommonStock" order="24" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromMinorityShareholders" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromMinorityShareholders"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_ProceedsFromMinorityShareholders" order="25" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToMinorityShareholders" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToMinorityShareholders"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_PaymentsToMinorityShareholders" order="26" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeasePrincipalPayments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeasePrincipalPayments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_FinanceLeasePrincipalPayments" order="27" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_NetCashProvidedByUsedInFinancingActivities" order="28" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect" order="29" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents" order="30" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashInvestingActivitiesAccruedCapitalExpenditures" xlink:href="rex-20260131.xsd#rex_NonCashInvestingActivitiesAccruedCapitalExpenditures"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NonCashInvestingActivitiesAccruedCapitalExpenditures" order="31" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashInvestingActivitiesCapitalAdditionsTransferredFromPrepaidExpenses" xlink:href="rex-20260131.xsd#rex_NonCashInvestingActivitiesCapitalAdditionsTransferredFromPrepaidExpenses"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NonCashInvestingActivitiesCapitalAdditionsTransferredFromPrepaidExpenses" order="32" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NoncashFinancingActivitiesStockAwardsIssued" xlink:href="rex-20260131.xsd#rex_NoncashFinancingActivitiesStockAwardsIssued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NoncashFinancingActivitiesStockAwardsIssued" order="33" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NonCashFinancingActivitiesEquityAwardsAccrued" xlink:href="rex-20260131.xsd#rex_NonCashFinancingActivitiesEquityAwardsAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NonCashFinancingActivitiesEquityAwardsAccrued" order="34" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NoncashFinancingActivitiesExciseTaxOnStockRepurchasesAccrued" xlink:href="rex-20260131.xsd#rex_NoncashFinancingActivitiesExciseTaxOnStockRepurchasesAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="rex_NoncashFinancingActivitiesExciseTaxOnStockRepurchasesAccrued" order="35" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability" order="36" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RightOfUseAssetObtainedInExchangeForFinanceLeaseLiability" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RightOfUseAssetObtainedInExchangeForFinanceLeaseLiability"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementOfCashFlowsAbstract" xlink:to="us-gaap_RightOfUseAssetObtainedInExchangeForFinanceLeaseLiability" order="37" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIES" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SignificantAccountingPoliciesTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SignificantAccountingPoliciesTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_SignificantAccountingPoliciesTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/NETSALESANDREVENUE" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:to="us-gaap_RevenueFromContractWithCustomerTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/INVESTMENTS" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InvestmentTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_InvestmentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FAIRVALUE" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueDisclosuresAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueDisclosuresTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueDisclosuresAbstract" xlink:to="us-gaap_FairValueDisclosuresTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/OTHERASSETS" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_OtherAssetsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIES" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PayablesAndAccrualsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PayablesAndAccrualsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_AccountsPayableAccruedLiabilitiesAndOtherLiabilitiesDisclosureCurrentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/LEASES" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="rex_LesseeFinanceAndOperatingLeasesTextBlock" xlink:href="rex-20260131.xsd#rex_LesseeFinanceAndOperatingLeasesTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="rex_LesseeFinanceAndOperatingLeasesTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/COMMONSTOCK" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_EquityAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityNoteDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquityNoteDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_StockholdersEquityNoteDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTS" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/EMPLOYEEBENEFITS" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndRetirementDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndEmployeeBenefitPlansTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndEmployeeBenefitPlansTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_CompensationAndEmployeeBenefitPlansTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/COMMITMENTS" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisclosureTextBlockSupplementAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommitmentsDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisclosureTextBlockSupplementAbstract" xlink:to="us-gaap_CommitmentsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/INCOMETAXES" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/CONTINGENCIES" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CommitmentsAndContingenciesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsAndContingenciesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommitmentsAndContingenciesDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsAndContingenciesDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CommitmentsAndContingenciesDisclosureAbstract" xlink:to="us-gaap_CommitmentsAndContingenciesDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/RELATEDPARTIES" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionsAbstract" xlink:to="us-gaap_RelatedPartyTransactionsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SEGMENTREPORTING" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingAbstract" xlink:to="us-gaap_SegmentReportingDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleIIVALUATIONANDQUALIFYINGACCOUNTS" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="srt_ValuationAndQualifyingAccountsAbstract" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ValuationAndQualifyingAccountsAbstract"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ValuationAndQualifyingAccountsAbstract" xlink:to="srt_ScheduleOfValuationAndQualifyingAccountsDisclosureTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/AccountingPoliciesByPolicy" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConsolidationPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConsolidationPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ConsolidationPolicyTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockSplitPolicy" xlink:href="rex-20260131.xsd#rex_StockSplitPolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="rex_StockSplitPolicy" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FiscalPeriod" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FiscalPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_FiscalPeriod" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingPolicyPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingPolicyPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_SegmentReportingPolicyPolicyTextBlock" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UseOfEstimates" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UseOfEstimates"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_UseOfEstimates" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CashAndCashEquivalentsPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_CashAndCashEquivalentsPolicyTextBlock" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskCreditRisk" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConcentrationRiskCreditRisk"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ConcentrationRiskCreditRisk" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradeAndOtherAccountsReceivablePolicy" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TradeAndOtherAccountsReceivablePolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_TradeAndOtherAccountsReceivablePolicy" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InventoryPolicyTextBlock" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentPolicyTextBlock" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ImpairmentOrDisposalOfLongLivedAssetsPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ImpairmentOrDisposalOfLongLivedAssetsPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ImpairmentOrDisposalOfLongLivedAssetsPolicyTextBlock" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeLeasesPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeLeasesPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_LesseeLeasesPolicyTextBlock" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InvestmentPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InvestmentPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InvestmentPolicyTextBlock" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueRecognitionPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueRecognitionPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_RevenueRecognitionPolicyTextBlock" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfSalesPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CostOfSalesPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_CostOfSalesPolicyTextBlock" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_SellingGeneralAndAdministrativeExpensesPolicyTextBlock" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueOfFinancialInstrumentsPolicy" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueOfFinancialInstrumentsPolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_FairValueOfFinancialInstrumentsPolicy" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationOptionAndIncentivePlansDirectorPolicy" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationOptionAndIncentivePlansDirectorPolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ShareBasedCompensationOptionAndIncentivePlansDirectorPolicy" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OtherIncomePolicy" xlink:href="rex-20260131.xsd#rex_OtherIncomePolicy"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="rex_OtherIncomePolicy" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_IncomeTaxPolicyTextBlock" order="19" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ComprehensiveIncomePolicyPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ComprehensiveIncomePolicyPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ComprehensiveIncomePolicyPolicyTextBlock" order="20" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock" order="21" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfInventoryCurrentTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfInventoryCurrentTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ScheduleOfInventoryCurrentTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentTextBlock" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/NETSALESANDREVENUETables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RevenueFromContractWithCustomerAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueFromContractWithCustomerAbstract" xlink:to="us-gaap_DisaggregationOfRevenueTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/INVESTMENTSTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="rex_INVESTMENTSTablesLineItems" xlink:href="rex-20260131.xsd#rex_INVESTMENTSTablesLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_INVESTMENTSTablesTable" xlink:href="rex-20260131.xsd#rex_INVESTMENTSTablesTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_INVESTMENTSTablesLineItems" xlink:to="rex_INVESTMENTSTablesTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByAssetClassAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueByAssetClassAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_INVESTMENTSTablesTable" xlink:to="us-gaap_FairValueByAssetClassAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByAssetClassAxis" xlink:to="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByAssetClassAxis" xlink:to="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:to="us-gaap_EquityMethodInvestmentsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentsTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentsTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSTablesLineItems" xlink:to="us-gaap_EquityMethodInvestmentsTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfCondensedBalanceSheetTableTextBlock" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScheduleOfCondensedBalanceSheetTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSTablesLineItems" xlink:to="srt_ScheduleOfCondensedBalanceSheetTableTextBlock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSaleOfStockBySubsidiaryOrEquityMethodInvesteeDisclosureTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfSaleOfStockBySubsidiaryOrEquityMethodInvesteeDisclosureTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INVESTMENTSTablesLineItems" xlink:to="us-gaap_ScheduleOfSaleOfStockBySubsidiaryOrEquityMethodInvesteeDisclosureTextBlock" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FAIRVALUETables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueDisclosuresAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueDisclosuresAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueDisclosuresAbstract" xlink:to="us-gaap_ScheduleOfFairValueAssetsAndLiabilitiesMeasuredOnRecurringBasisTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/OTHERASSETSTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfOtherAssetsTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfOtherAssetsTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_ScheduleOfOtherAssetsTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ACCRUEDEXPENSESANDOTHERCURRENTLIABILITIESTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PayablesAndAccrualsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PayablesAndAccrualsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/LEASESTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseCostTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseCostTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LeaseCostTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityMaturityTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityMaturityTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityMaturityTableTextBlock" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/COMMONSTOCKTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_EquityAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfStockByClassTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfStockByClassTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_ScheduleOfStockByClassTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_ScheduleOfDerivativeAssetsAtFairValueTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfDerivativeInstrumentsTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfDerivativeInstrumentsTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_ScheduleOfDerivativeInstrumentsTextBlock" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/EMPLOYEEBENEFITSTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndRetirementDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_NonvestedRestrictedStockSharesActivityTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfWeightedAverageNumberOfSharesTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfWeightedAverageNumberOfSharesTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_ScheduleOfWeightedAverageNumberOfSharesTableTextBlock" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/INCOMETAXESTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfCashFlowSupplementalDisclosuresTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfCashFlowSupplementalDisclosuresTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfCashFlowSupplementalDisclosuresTableTextBlock" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ScheduleOfUnrecognizedTaxBenefitsTableTextBlock" xlink:href="rex-20260131.xsd#rex_ScheduleOfUnrecognizedTaxBenefitsTableTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_ScheduleOfUnrecognizedTaxBenefitsTableTextBlock" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SEGMENTREPORTINGTables" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingAbstract" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofInventoryTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryFinishedGoods" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryFinishedGoods"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InventoryFinishedGoods" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryWorkInProcess" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryWorkInProcess"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InventoryWorkInProcess" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryRawMaterialsAndSupplies" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryRawMaterialsAndSupplies"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InventoryRawMaterialsAndSupplies" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_InventoryNet" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofPropertyandEquipmentTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_AccountingPoliciesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountingPoliciesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LandAndLandImprovements" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LandAndLandImprovements"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_LandAndLandImprovements" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BuildingsAndImprovementsGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BuildingsAndImprovementsGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_BuildingsAndImprovementsGross" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MachineryAndEquipmentGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MachineryAndEquipmentGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_MachineryAndEquipmentGross" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConstructionInProgressGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConstructionInProgressGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_ConstructionInProgressGross" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentGross" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccountingPoliciesAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentNet" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofDisaggregatedRevenuebyProductTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DisaggregationOfRevenueLineItems" xlink:to="us-gaap_DisaggregationOfRevenueTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ProductOrServiceAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ProductOrServiceAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DisaggregationOfRevenueTable" xlink:to="srt_ProductOrServiceAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ProductsAndServicesDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ProductsAndServicesDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ProductsAndServicesDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ProductsAndServicesDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260131.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_EthanolMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DriedDistillersGrainsMember" xlink:href="rex-20260131.xsd#rex_DriedDistillersGrainsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_DriedDistillersGrainsMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DistillersCornOilMember" xlink:href="rex-20260131.xsd#rex_DistillersCornOilMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_DistillersCornOilMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ModifiedDistillersGrainsMember" xlink:href="rex-20260131.xsd#rex_ModifiedDistillersGrainsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_ModifiedDistillersGrainsMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DerivativeFinancialInstrumentGainsLossesMember" xlink:href="rex-20260131.xsd#rex_DerivativeFinancialInstrumentGainsLossesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_DerivativeFinancialInstrumentGainsLossesMember" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OtherMember" xlink:href="rex-20260131.xsd#rex_OtherMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="rex_OtherMember" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisaggregationOfRevenueLineItems" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofEquityMethodInvestmentsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ScheduleOfEquityMethodInvestmentsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:to="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20260131.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_EquityMethodInvesteeNameDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_EquityMethodInvestments" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentOwnershipPercentage" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentOwnershipPercentage"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_EquityMethodInvestmentOwnershipPercentage" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SummarizedFinancialInformationforEquityMethodInvesteeTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ScheduleOfEquityMethodInvestmentsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:to="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeAxis" xlink:to="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeAxis" xlink:to="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20260131.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityMethodInvestmentNonconsolidatedInvesteeDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_AssetsCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_AssetsNoncurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Assets" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Assets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_Assets" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_LiabilitiesCurrent" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_LiabilitiesNoncurrent" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Liabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Liabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_Liabilities" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MembersCapital" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MembersCapital"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_MembersCapital" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MinorityInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MinorityInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_MinorityInterest" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MembersEquity" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MembersEquity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_MembersEquity" order="8" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofFinancialInformationforEquityMethodInvestmentsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ScheduleOfEquityMethodInvestmentsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_LegalEntityAxis" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_LegalEntityAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:to="dei_LegalEntityAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain_0" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20260131.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_GrossProfit" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Depreciation" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Depreciation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_Depreciation" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_NetIncomeLoss" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetIncomeLossAttributableToNoncontrollingInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_NetIncomeLossAttributableToNoncontrollingInterest" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofFairValueAssetsandLiabilitiesMeasuredonRecurringBasisTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueByMeasurementFrequencyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FairValueByMeasurementFrequencyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementFrequencyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:to="us-gaap_FairValueMeasurementFrequencyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementFrequencyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:to="us-gaap_FairValueMeasurementFrequencyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FairValueByFairValueHierarchyLevelAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinancialInstrumentAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinancialInstrumentAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FinancialInstrumentAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FinancialInstrumentAxis" xlink:to="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel1Member" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel1Member" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel2Member" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel2Member" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel3Member" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel3Member" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsRecurringMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementsRecurringMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementFrequencyDomain" xlink:to="us-gaap_FairValueMeasurementsRecurringMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsAssetMember" xlink:href="rex-20260131.xsd#rex_ForwardPurchaseContractsAssetMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="rex_ForwardPurchaseContractsAssetMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CommodityFuturesAssetMember" xlink:href="rex-20260131.xsd#rex_CommodityFuturesAssetMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="rex_CommodityFuturesAssetMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsLiabilityMember" xlink:href="rex-20260131.xsd#rex_ForwardPurchaseContractsLiabilityMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain" xlink:to="rex_ForwardPurchaseContractsLiabilityMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsFairValueDisclosure" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_AssetsFairValueDisclosure" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_DerivativeLiabilities" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofOtherAssetsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_DeferredIncomeTaxesAndOtherAssetsNoncurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PrepaidExpenseOtherNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PrepaidExpenseOtherNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_PrepaidExpenseOtherNoncurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsMiscellaneousNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsMiscellaneousNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_OtherAssetsMiscellaneousNoncurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAssetsNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherAssetsAbstract" xlink:to="us-gaap_OtherAssetsNoncurrent" order="3" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofAccruedExpensesandOtherCurrentLiabilitiesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_PayablesAndAccrualsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PayablesAndAccrualsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeRelatedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EmployeeRelatedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_EmployeeRelatedLiabilitiesCurrent" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedUtilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedUtilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_AccruedUtilitiesCurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AccruedCapitalExpendituresCurrent" xlink:href="rex-20260131.xsd#rex_AccruedCapitalExpendituresCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="rex_AccruedCapitalExpendituresCurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AccruedTransportationRelatedItems" xlink:href="rex-20260131.xsd#rex_AccruedTransportationRelatedItems"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="rex_AccruedTransportationRelatedItems" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_AccruedForwardPurchaseContractsCurrent" xlink:href="rex-20260131.xsd#rex_AccruedForwardPurchaseContractsCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="rex_AccruedForwardPurchaseContractsCurrent" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_AccrualForTaxesOtherThanIncomeTaxesCurrent" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherAccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherAccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_OtherAccruedLiabilitiesCurrent" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PayablesAndAccrualsAbstract" xlink:to="us-gaap_AccruedLiabilitiesCurrent" order="7" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleofLeaseCostTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseCost" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseCost"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_OperatingLeaseCost" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_VariableLeaseCost" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_VariableLeaseCost"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_VariableLeaseCost" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseCost" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseCost"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LeaseCost" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FutureMinimumRentalPaymentsforOperatingLeasesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseLiability" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseLiability"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_OperatingLeaseLiability" order="7" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FutureMinimumRentalPaymentsforFinancingLeasesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_LeasesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeasesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueNextTwelveMonths" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueYearTwo" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueYearThree" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueYearFour" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueYearFive" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDueAfterYearFive" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDue" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityUndiscountedExcessAmount" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityUndiscountedExcessAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiabilityUndiscountedExcessAmount" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiability" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiability"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesAbstract" xlink:to="us-gaap_FinanceLeaseLiability" order="8" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/InformationRegardingtheCommonStockTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_EquityAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesAuthorized" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_CommonStockSharesAuthorized" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesIssued" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockSharesIssued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_CommonStockSharesIssued" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockSharesOutstanding" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityAbstract" xlink:to="us-gaap_CommonStockSharesOutstanding" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FairValuesforDerivativeFinancialInstrumentsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OffsettingAssetsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OffsettingAssetsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OffsettingAssetsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OffsettingAssetsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_OffsettingAssetsLineItems" xlink:to="us-gaap_OffsettingAssetsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_OffsettingAssetsTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ForwardContractsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ForwardContractsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_ForwardContractsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CashCollateralBalanceMember" xlink:href="rex-20260131.xsd#rex_CashCollateralBalanceMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="rex_CashCollateralBalanceMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommodityContractMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommodityContractMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_CommodityContractMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NetPositionWithBrokerMember" xlink:href="rex-20260131.xsd#rex_NetPositionWithBrokerMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="rex_NetPositionWithBrokerMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeAssets" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OffsettingAssetsLineItems" xlink:to="us-gaap_DerivativeAssets" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OffsettingAssetsLineItems" xlink:to="us-gaap_DerivativeLiabilities" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/InformationAboutLossesGainsRecognizedinIncomeonDerivativeFinancialInstrumentsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GainLossOnDerivativeInstrumentsNetPretax" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GainLossOnDerivativeInstrumentsNetPretax"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="us-gaap_GainLossOnDerivativeInstrumentsNetPretax" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_GainLossOnDerivativeInstrumentsCostOfSales" xlink:href="rex-20260131.xsd#rex_GainLossOnDerivativeInstrumentsCostOfSales"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsAndHedgingActivitiesDisclosureAbstract" xlink:to="rex_GainLossOnDerivativeInstrumentsCostOfSales" order="1" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/NonVestedRestrictedStockAwardActivityTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndRetirementDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue" xlink:href="rex-20260131.xsd#rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsWeightedAverageGrantDateFairValue" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTermsInYears" xlink:href="rex-20260131.xsd#rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTermsInYears"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="rex_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTermsInYears" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockGrantedDuringPeriodValueSharebasedCompensationGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockGrantedDuringPeriodValueSharebasedCompensationGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_StockGrantedDuringPeriodValueSharebasedCompensationGross" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardForfeited" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardForfeitures" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedInPeriodFairValue1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedInPeriodFairValue1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedInPeriodFairValue1" order="8" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/DilutedWeightedAverageSharesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CompensationAndRetirementDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CompensationAndRetirementDisclosureAbstract" xlink:to="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ProvisionforIncomeTaxesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CurrentFederalTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CurrentFederalTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_CurrentFederalTaxExpenseBenefit" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredFederalIncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredFederalIncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredFederalIncomeTaxExpenseBenefit" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FederalIncomeTaxExpenseBenefitContinuingOperations" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FederalIncomeTaxExpenseBenefitContinuingOperations"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_FederalIncomeTaxExpenseBenefitContinuingOperations" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CurrentStateAndLocalTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CurrentStateAndLocalTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_CurrentStateAndLocalTaxExpenseBenefit" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredStateAndLocalIncomeTaxExpenseBenefit" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StateAndLocalIncomeTaxExpenseBenefitContinuingOperations" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StateAndLocalIncomeTaxExpenseBenefitContinuingOperations"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_StateAndLocalIncomeTaxExpenseBenefitContinuingOperations" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/DeferredTaxAssetsandLiabilitiesTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwards"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccrualsAccruedLiabilities" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsStateAndLocal" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsStateAndLocal"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsStateAndLocal" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsOther" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsOther" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsValuationAllowance" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsValuationAllowance"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsValuationAllowance" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsNet" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_DeferredTaxLiabilitiesBasisInPassThroughEntitiesIncludingDepreciation" xlink:href="rex-20260131.xsd#rex_DeferredTaxLiabilitiesBasisInPassThroughEntitiesIncludingDepreciation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_DeferredTaxLiabilitiesBasisInPassThroughEntitiesIncludingDepreciation" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxLiabilitiesOther" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxLiabilitiesOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxLiabilitiesOther" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredIncomeTaxLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredIncomeTaxLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredIncomeTaxLiabilities" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxLiabilities" order="9" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/IncomeTaxesPaidTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxPaidFederalAfterRefundReceived" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxPaidFederalAfterRefundReceived"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxPaidFederalAfterRefundReceived" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxPaidStateAndLocalAfterRefundReceived" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxPaidStateAndLocalAfterRefundReceived"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxPaidStateAndLocalAfterRefundReceived" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxesPaidNet" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxesPaidNet"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxesPaidNet" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/IncomeTaxesPaidNetofRefundsTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_EffectiveIncomeTaxRateReconciliationLineItems" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxAuthorityAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_EffectiveIncomeTaxRateReconciliationTable" xlink:to="us-gaap_IncomeTaxAuthorityAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxAuthorityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeTaxAuthorityAxis" xlink:to="us-gaap_IncomeTaxAuthorityDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxAuthorityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_IncomeTaxAuthorityAxis" xlink:to="us-gaap_IncomeTaxAuthorityDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="stpr_IL" xlink:href="https://xbrl.sec.gov/stpr/2026/stpr-2026.xsd#stpr_IL"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxAuthorityDomain" xlink:to="stpr_IL" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxPaidStateAndLocalAfterRefundReceived" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxPaidStateAndLocalAfterRefundReceived"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EffectiveIncomeTaxRateReconciliationLineItems" xlink:to="us-gaap_IncomeTaxPaidStateAndLocalAfterRefundReceived" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ReconciliationsofIncomeTaxBenefitProvisionTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationStateAndLocalIncomeTaxes" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EffectiveIncomeTaxRateReconciliation45ZCredits" xlink:href="rex-20260131.xsd#rex_EffectiveIncomeTaxRateReconciliation45ZCredits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_EffectiveIncomeTaxRateReconciliation45ZCredits" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EffectiveIncomeTaxRateReconciliation45ZCreditsPercent" xlink:href="rex-20260131.xsd#rex_EffectiveIncomeTaxRateReconciliation45ZCreditsPercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_EffectiveIncomeTaxRateReconciliation45ZCreditsPercent" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxReconciliationTaxCreditsOther" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxReconciliationTaxCreditsOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxReconciliationTaxCreditsOther" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsOther" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationTaxCreditsOther" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseShareBasedCompensationCost" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseShareBasedCompensationCost"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseShareBasedCompensationCost" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EffectiveIncomeTaxRateReconciliationNontaxable45ZRevenuePassedThroughAmount" xlink:href="rex-20260131.xsd#rex_EffectiveIncomeTaxRateReconciliationNontaxable45ZRevenuePassedThroughAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_EffectiveIncomeTaxRateReconciliationNontaxable45ZRevenuePassedThroughAmount" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseNontaxable45ZRevenuePassedThroughPercentage" xlink:href="rex-20260131.xsd#rex_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseNontaxable45ZRevenuePassedThroughPercentage"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseNontaxable45ZRevenuePassedThroughPercentage" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxReconciliationTaxContingencies" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxReconciliationTaxContingencies"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxReconciliationTaxContingencies" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationTaxContingencies" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxReconciliationMinorityInterestIncomeExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxReconciliationMinorityInterestIncomeExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxReconciliationMinorityInterestIncomeExpense" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationMinorityInterestIncomeExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationMinorityInterestIncomeExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationMinorityInterestIncomeExpense" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxReconciliationOtherAdjustments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxReconciliationOtherAdjustments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxReconciliationOtherAdjustments" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateReconciliationOtherAdjustments" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_EffectiveIncomeTaxRateContinuingOperations" order="19" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/UnrecognizedTaxBenefitsRollForwardTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="rex_UnrecognizedTaxBenefitsRollForwardAbstract" xlink:href="rex-20260131.xsd#rex_UnrecognizedTaxBenefitsRollForwardAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefits" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_UnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefits" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_UnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_UnrecognizedTaxBenefitsRollForwardAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/UnrecognizedTaxBenefitConsolidatedBalanceSheetTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsLineItems" xlink:href="rex-20260131.xsd#rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsTable" xlink:href="rex-20260131.xsd#rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsLineItems" xlink:to="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MeasurementInputTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsTable" xlink:to="us-gaap_MeasurementInputTypeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_MeasurementInputTypeAxis" xlink:to="us-gaap_MeasurementInputTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MeasurementInputTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_MeasurementInputTypeAxis" xlink:to="us-gaap_MeasurementInputTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_UnrecognizedTaxBenefitMember" xlink:href="rex-20260131.xsd#rex_UnrecognizedTaxBenefitMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_MeasurementInputTypeDomain" xlink:to="rex_UnrecognizedTaxBenefitMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxesReceivable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxesReceivable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsLineItems" xlink:to="us-gaap_IncomeTaxesReceivable" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsOther" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsOther"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsLineItems" xlink:to="us-gaap_DeferredTaxAssetsOther" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TaxesPayableCurrentAndNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TaxesPayableCurrentAndNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsLineItems" xlink:to="us-gaap_TaxesPayableCurrentAndNoncurrent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherLiabilitiesNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsLineItems" xlink:to="us-gaap_OtherLiabilitiesNoncurrent" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefits" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefits"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_INCOMETAXESUnrecognizedTaxBenefitConsolidatedBalanceSheetDetailsLineItems" xlink:to="us-gaap_UnrecognizedTaxBenefits" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ReportableSegmentTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingInformationLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolAndByProductsMember" xlink:href="rex-20260131.xsd#rex_EthanolAndByProductsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolAndByProductsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EquityMethodEthanolInvestmentMember" xlink:href="rex-20260131.xsd#rex_EquityMethodEthanolInvestmentMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EquityMethodEthanolInvestmentMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CornMember" xlink:href="rex-20260131.xsd#rex_CornMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_CornMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OtherCostOfSalesMember" xlink:href="rex-20260131.xsd#rex_OtherCostOfSalesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_OtherCostOfSalesMember" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Revenues" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Revenues"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_Revenues" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CostOfGoodsAndServicesSold" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_CostOfGoodsAndServicesSold" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_GrossProfit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_GrossProfit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_GrossProfit" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DepreciationAndAmortization" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepreciationAndAmortization"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_DepreciationAndAmortization" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossAttributableToParent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossAttributableToParent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_IncomeLossAttributableToParent" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NetInvestmentIncome" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NetInvestmentIncome"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_NetInvestmentIncome" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/ScheduleIIVALUATIONANDQUALIFYINGACCOUNTSTable" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowanceLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowanceLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowanceTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowanceTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ValuationAllowanceLineItems" xlink:to="us-gaap_ValuationAllowanceTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowancesAndReservesTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowancesAndReservesTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ValuationAllowanceTable" xlink:to="us-gaap_ValuationAllowancesAndReservesTypeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowancesAndReservesDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowancesAndReservesDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ValuationAllowancesAndReservesTypeAxis" xlink:to="us-gaap_ValuationAllowancesAndReservesDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowancesAndReservesDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowancesAndReservesDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ValuationAllowancesAndReservesTypeAxis" xlink:to="us-gaap_ValuationAllowancesAndReservesDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ValuationAllowancesAndReservesDomain" xlink:to="us-gaap_ValuationAllowanceOfDeferredTaxAssetsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowancesAndReservesBalance" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowancesAndReservesBalance"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ValuationAllowanceLineItems" xlink:to="us-gaap_ValuationAllowancesAndReservesBalance" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ValuationAllowanceLineItems" xlink:to="us-gaap_ValuationAllowancesAndReservesChargedToCostAndExpense" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowancesAndReservesDeductions" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowancesAndReservesDeductions"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ValuationAllowanceLineItems" xlink:to="us-gaap_ValuationAllowancesAndReservesDeductions" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:href="rex-20260131.xsd#rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:href="rex-20260131.xsd#rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="srt_RangeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_PropertyPlantAndEquipmentByTypeAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:to="us-gaap_PropertyPlantAndEquipmentTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:to="us-gaap_PropertyPlantAndEquipmentTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_DividendsAxis" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DividendsAxis" xlink:to="us-gaap_DividendsDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DividendsAxis" xlink:to="us-gaap_DividendsDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskByTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConcentrationRiskByTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_ConcentrationRiskByTypeAxis" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ConcentrationRiskByTypeAxis" xlink:to="us-gaap_ConcentrationRiskTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConcentrationRiskTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ConcentrationRiskByTypeAxis" xlink:to="us-gaap_ConcentrationRiskTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MajorCustomersAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MajorCustomersAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="srt_MajorCustomersAxis" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_NameOfMajorCustomerDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_NameOfMajorCustomerDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_MajorCustomersAxis" xlink:to="srt_NameOfMajorCustomerDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_NameOfMajorCustomerDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_NameOfMajorCustomerDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_MajorCustomersAxis" xlink:to="srt_NameOfMajorCustomerDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsTable" xlink:to="us-gaap_ConcentrationRiskByBenchmarkAxis" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskBenchmarkDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:to="us-gaap_ConcentrationRiskBenchmarkDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskBenchmarkDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConcentrationRiskBenchmarkDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:to="us-gaap_ConcentrationRiskBenchmarkDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_S2025Q2DividendsMember" xlink:href="rex-20260131.xsd#rex_S2025Q2DividendsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DividendsDomain" xlink:to="rex_S2025Q2DividendsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MinimumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MinimumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MaximumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MaximumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CustomerMember" xlink:href="rex-20260131.xsd#rex_CustomerMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_NameOfMajorCustomerDomain" xlink:to="rex_CustomerMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SalesRevenueNetMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SalesRevenueNetMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConcentrationRiskBenchmarkDomain" xlink:to="us-gaap_SalesRevenueNetMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsReceivableMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsReceivableMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConcentrationRiskBenchmarkDomain" xlink:to="us-gaap_AccountsReceivableMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CustomerConcentrationRiskMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CustomerConcentrationRiskMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ConcentrationRiskTypeDomain" xlink:to="us-gaap_CustomerConcentrationRiskMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConsolidatedEntitiesMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConsolidatedEntitiesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="us-gaap_ConsolidatedEntitiesMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvesteeMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvesteeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="us-gaap_EquityMethodInvesteeMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_BuildingAndBuildingImprovementsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_BuildingAndBuildingImprovementsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:to="us-gaap_BuildingAndBuildingImprovementsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FurnitureAndFixturesMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FurnitureAndFixturesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:to="us-gaap_FurnitureAndFixturesMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RexAmericanResourcesMember" xlink:href="rex-20260131.xsd#rex_RexAmericanResourcesMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_EquityMethodInvesteeNameDomain" xlink:to="rex_RexAmericanResourcesMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolAndByProductsMember" xlink:href="rex-20260131.xsd#rex_EthanolAndByProductsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolAndByProductsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260131.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NumberofOperatingEntities" xlink:href="rex-20260131.xsd#rex_NumberofOperatingEntities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_NumberofOperatingEntities" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityNoteStockSplitConversionRatio1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquityNoteStockSplitConversionRatio1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_StockholdersEquityNoteStockSplitConversionRatio1" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockDividendPercent" xlink:href="rex-20260131.xsd#rex_StockDividendPercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_StockDividendPercent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsPayableDateDeclaredMonthAndYear" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsPayableDateDeclaredMonthAndYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_DividendsPayableDateDeclaredMonthAndYear" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsPayableDateOfRecordDayMonthAndYear" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsPayableDateOfRecordDayMonthAndYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_DividendsPayableDateOfRecordDayMonthAndYear" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NumberOfReportableSegments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NumberOfReportableSegments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_NumberOfReportableSegments" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NumberofCustomers" xlink:href="rex-20260131.xsd#rex_NumberofCustomers"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_NumberofCustomers" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ConcentrationRiskPercentage1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ConcentrationRiskPercentage1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_ConcentrationRiskPercentage1" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsReceivableNetCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_AccountsReceivableNetCurrent" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_InventoryWriteDown" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_InventoryWriteDown"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_InventoryWriteDown" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentDepreciationMethodExtensibleEnumeration" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentDepreciationMethodExtensibleEnumeration"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_PropertyPlantAndEquipmentDepreciationMethodExtensibleEnumeration" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentUsefulLife" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_PropertyPlantAndEquipmentUsefulLife" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ImpairmentOfLongLivedAssetsToBeDisposedOf" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ImpairmentOfLongLivedAssetsToBeDisposedOf"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_ImpairmentOfLongLivedAssetsToBeDisposedOf" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_Depreciation" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_Depreciation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_Depreciation" order="13" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_NumberofFinanceLeaseAgreement" xlink:href="rex-20260131.xsd#rex_NumberofFinanceLeaseAgreement"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_NumberofFinanceLeaseAgreement" order="14" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeFinanceLeaseTermOfContract1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeFinanceLeaseTermOfContract1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_LesseeFinanceLeaseTermOfContract1" order="15" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" order="16" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentOwnershipPercentage" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentOwnershipPercentage"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_EquityMethodInvestmentOwnershipPercentage" order="17" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsInHedgesAssetsAtFairValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsInHedgesAssetsAtFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_DerivativeInstrumentsInHedgesAssetsAtFairValue" order="18" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsInHedgesLiabilitiesAtFairValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentsInHedgesLiabilitiesAtFairValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_DerivativeInstrumentsInHedgesLiabilitiesAtFairValue" order="19" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_CommonStockCapitalSharesReservedForFutureIssuance" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommonStockCapitalSharesReservedForFutureIssuance"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="us-gaap_CommonStockCapitalSharesReservedForFutureIssuance" order="20" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FundReceivedfromUSDepartmentofAgriculture" xlink:href="rex-20260131.xsd#rex_FundReceivedfromUSDepartmentofAgriculture"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_SUMMARYOFSIGNIFICANTACCOUNTINGPOLICIESDetailsLineItems" xlink:to="rex_FundReceivedfromUSDepartmentofAgriculture" order="21" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/NETSALESANDREVENUEDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DisaggregationOfRevenueTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DisaggregationOfRevenueLineItems" xlink:to="us-gaap_DisaggregationOfRevenueTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DisaggregationOfRevenueTable" xlink:to="srt_RangeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MinimumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MinimumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MaximumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MaximumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_SalesPaymentTerms" xlink:href="rex-20260131.xsd#rex_SalesPaymentTerms"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DisaggregationOfRevenueLineItems" xlink:to="rex_SalesPaymentTerms" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/INVESTMENTSDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfEquityMethodInvestmentsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ScheduleOfEquityMethodInvestmentsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:to="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_EquityMethodInvesteeNameDomain_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_EquityMethodInvesteeNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis" xlink:to="srt_EquityMethodInvesteeNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_BigRiverMember" xlink:href="rex-20260131.xsd#rex_BigRiverMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_EquityMethodInvesteeNameDomain" xlink:to="rex_BigRiverMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260131.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireEquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_PaymentsToAcquireEquityMethodInvestments" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OperatingNumberOfEthanolManufacturingFacilities" xlink:href="rex-20260131.xsd#rex_OperatingNumberOfEthanolManufacturingFacilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="rex_OperatingNumberOfEthanolManufacturingFacilities" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityofEthanolShipped" xlink:href="rex-20260131.xsd#rex_QuantityofEthanolShipped"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="rex_QuantityofEthanolShipped" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeLossFromEquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeLossFromEquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_IncomeLossFromEquityMethodInvestments" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromDividendsReceived" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromDividendsReceived"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_ProceedsFromDividendsReceived" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_EquityMethodInvestments" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EquityMethodInvestmentUnderlyingEquityInNetAssets" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EquityMethodInvestmentUnderlyingEquityInNetAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_EquityMethodInvestmentUnderlyingEquityInNetAssets" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OtherRestrictedAssets" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OtherRestrictedAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_OtherRestrictedAssets" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ProportionateShareofRestrictedNetAssets" xlink:href="rex-20260131.xsd#rex_ProportionateShareofRestrictedNetAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="rex_ProportionateShareofRestrictedNetAssets" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecurities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecurities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_HeldToMaturitySecurities" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_DebtSecuritiesHeldToMaturityMaturityWithinOneYearWeightedAverageYield" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfEquityMethodInvestmentsLineItems" xlink:to="us-gaap_HeldToMaturitySecuritiesAccumulatedUnrecognizedHoldingLoss" order="11" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/FAIRVALUEDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueByMeasurementFrequencyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:to="us-gaap_FairValueByMeasurementFrequencyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementFrequencyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:to="us-gaap_FairValueMeasurementFrequencyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementFrequencyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementFrequencyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByMeasurementFrequencyAxis" xlink:to="us-gaap_FairValueMeasurementFrequencyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsNonrecurringMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FairValueMeasurementsNonrecurringMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementFrequencyDomain" xlink:to="us-gaap_FairValueMeasurementsNonrecurringMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsFairValueDisclosure" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:to="us-gaap_AssetsFairValueDisclosure" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/LEASESDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasedAssetsLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeasedAssetsLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfOperatingLeasedAssetsTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfOperatingLeasedAssetsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_ScheduleOfOperatingLeasedAssetsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FrequencyAxis" xlink:href="rex-20260131.xsd#rex_FrequencyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfOperatingLeasedAssetsTable" xlink:to="rex_FrequencyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FrequencyDomainDomain" xlink:href="rex-20260131.xsd#rex_FrequencyDomainDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="rex_FrequencyAxis" xlink:to="rex_FrequencyDomainDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FrequencyDomainDomain_0" xlink:href="rex-20260131.xsd#rex_FrequencyDomainDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="rex_FrequencyAxis" xlink:to="rex_FrequencyDomainDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_MonthlyMember" xlink:href="rex-20260131.xsd#rex_MonthlyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_FrequencyDomainDomain" xlink:to="rex_MonthlyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeasePayments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeasePayments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_OperatingLeasePayments" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FinanceLeasePrepayments" xlink:href="rex-20260131.xsd#rex_FinanceLeasePrepayments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="rex_FinanceLeasePrepayments" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiabilityPaymentsDue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseLiabilityPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_FinanceLeaseLiabilityPaymentsDue" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeFinanceLeaseTermOfContract1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeFinanceLeaseTermOfContract1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_LesseeFinanceLeaseTermOfContract1" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_FinancingLeaseExpense" xlink:href="rex-20260131.xsd#rex_FinancingLeaseExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="rex_FinancingLeaseExpense" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseInterestExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseInterestExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_FinanceLeaseInterestExpense" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeFinanceLeaseRemainingLeaseTerm" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeFinanceLeaseRemainingLeaseTerm"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_LesseeFinanceLeaseRemainingLeaseTerm" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OperatingLeasedAssetsLineItems" xlink:to="us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" order="9" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/COMMONSTOCKDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="rex_COMMONSTOCKDetailsLineItems" xlink:href="rex-20260131.xsd#rex_COMMONSTOCKDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_COMMONSTOCKDetailsTable" xlink:href="rex-20260131.xsd#rex_COMMONSTOCKDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="rex_COMMONSTOCKDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_COMMONSTOCKDetailsTable" xlink:to="us-gaap_DividendsAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DividendsAxis" xlink:to="us-gaap_DividendsDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DividendsAxis" xlink:to="us-gaap_DividendsDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_S2025Q2DividendsMember" xlink:href="rex-20260131.xsd#rex_S2025Q2DividendsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DividendsDomain" xlink:to="rex_S2025Q2DividendsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockholdersEquityNoteStockSplitConversionRatio1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockholdersEquityNoteStockSplitConversionRatio1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="us-gaap_StockholdersEquityNoteStockSplitConversionRatio1" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockDividendPercent" xlink:href="rex-20260131.xsd#rex_StockDividendPercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="rex_StockDividendPercent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsPayableDateDeclaredMonthAndYear" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsPayableDateDeclaredMonthAndYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="us-gaap_DividendsPayableDateDeclaredMonthAndYear" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DividendsPayableDateOfRecordDayMonthAndYear" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DividendsPayableDateOfRecordDayMonthAndYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="us-gaap_DividendsPayableDateOfRecordDayMonthAndYear" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockRepurchasedDuringPeriodShares" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockRepurchasedDuringPeriodShares"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="us-gaap_StockRepurchasedDuringPeriodShares" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockRepurchasedDuringPeriodValue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockRepurchasedDuringPeriodValue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="us-gaap_StockRepurchasedDuringPeriodValue" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockRepurchaseProgramNumberOfAdditionalSharesAuthorizedToBeRepurchased" xlink:href="rex-20260131.xsd#rex_StockRepurchaseProgramNumberOfAdditionalSharesAuthorizedToBeRepurchased"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMONSTOCKDetailsLineItems" xlink:to="rex_StockRepurchaseProgramNumberOfAdditionalSharesAuthorizedToBeRepurchased" order="6" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/DERIVATIVEFINANCIALINSTRUMENTSDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ContractWithCustomerDurationAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_ContractWithCustomerDurationAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ContractWithCustomerDurationDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ContractWithCustomerDurationAxis" xlink:to="us-gaap_ContractWithCustomerDurationDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerDurationDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ContractWithCustomerDurationDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ContractWithCustomerDurationAxis" xlink:to="us-gaap_ContractWithCustomerDurationDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TradingActivityByTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_TradingActivityByTypeAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TradingActivityByTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_TradingActivityByTypeAxis" xlink:to="us-gaap_TradingActivityByTypeDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TradingActivityByTypeDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TradingActivityByTypeDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_TradingActivityByTypeAxis" xlink:to="us-gaap_TradingActivityByTypeDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShortMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShortMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ContractWithCustomerDurationDomain" xlink:to="us-gaap_ShortMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LongMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LongMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ContractWithCustomerDurationDomain" xlink:to="us-gaap_LongMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_AssetsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesTotalMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesTotalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_LiabilitiesTotalMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CashCollateralBalanceMember" xlink:href="rex-20260131.xsd#rex_CashCollateralBalanceMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="rex_CashCollateralBalanceMember" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CornMember" xlink:href="rex-20260131.xsd#rex_CornMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TradingActivityByTypeDomain" xlink:to="rex_CornMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260131.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TradingActivityByTypeDomain" xlink:to="rex_EthanolMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeAssetStatementOfFinancialPositionExtensibleEnumeration" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeAssetStatementOfFinancialPositionExtensibleEnumeration"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_DerivativeAssetStatementOfFinancialPositionExtensibleEnumeration" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsQuantity" xlink:href="rex-20260131.xsd#rex_ForwardPurchaseContractsQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="rex_ForwardPurchaseContractsQuantity" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilityStatementOfFinancialPositionExtensibleEnumeration" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeLiabilityStatementOfFinancialPositionExtensibleEnumeration"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_DerivativeLiabilityStatementOfFinancialPositionExtensibleEnumeration" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DerivativeAssets" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DerivativeAssets"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_DerivativeAssets" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CommodityFuturesQuantity" xlink:href="rex-20260131.xsd#rex_CommodityFuturesQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="rex_CommodityFuturesQuantity" order="4" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/EMPLOYEEBENEFITSDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeAxis" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="srt_RangeAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_RangeMember_0" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_RangeMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PlanNameAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_PlanNameAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PlanNameAxis" xlink:to="us-gaap_PlanNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PlanNameDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PlanNameAxis" xlink:to="us-gaap_PlanNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AwardTypeAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AwardTypeAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:to="us-gaap_AwardTypeAxis" order="12" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_AwardTypeAxis" xlink:to="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_StockOptionPlans2015Member" xlink:href="rex-20260131.xsd#rex_StockOptionPlans2015Member"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PlanNameDomain" xlink:to="rex_StockOptionPlans2015Member" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RestrictedStockMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RestrictedStockMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="us-gaap_RestrictedStockMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RestrictedStockUnitsRSUMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RestrictedStockUnitsRSUMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="us-gaap_RestrictedStockUnitsRSUMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MinimumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MinimumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="srt_MaximumMember" xlink:href="https://xbrl.fasb.org/srt/2026/elts/srt-2026.xsd#srt_MaximumMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodValueRestrictedStockAwardGross" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodSharesRestrictedStockAwardGross" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RestrictedStockUnitsEligibleToVestPercent" xlink:href="rex-20260131.xsd#rex_RestrictedStockUnitsEligibleToVestPercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="rex_RestrictedStockUnitsEligibleToVestPercent" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_CalculatedPayoutOfRestrictedStockUnitsPercent" xlink:href="rex-20260131.xsd#rex_CalculatedPayoutOfRestrictedStockUnitsPercent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="rex_CalculatedPayoutOfRestrictedStockUnitsPercent" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ShareBasedCompensation" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ShareBasedCompensation"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_ShareBasedCompensation" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RestrictedStockExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RestrictedStockExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_RestrictedStockExpense" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:to="us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" order="11" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/COMMITMENTSDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="rex_COMMITMENTSDetailsLineItems" xlink:href="rex-20260131.xsd#rex_COMMITMENTSDetailsLineItems"/>
    <loc xlink:type="locator" xlink:label="rex_COMMITMENTSDetailsTable" xlink:href="rex-20260131.xsd#rex_COMMITMENTSDetailsTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="rex_COMMITMENTSDetailsTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseContractualTermAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_COMMITMENTSDetailsTable" xlink:to="us-gaap_LeaseContractualTermAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseContractualTermDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_LeaseContractualTermAxis" xlink:to="us-gaap_LeaseContractualTermDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LeaseContractualTermDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_LeaseContractualTermAxis" xlink:to="us-gaap_LeaseContractualTermDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_LegalEntityAxis" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_LegalEntityAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="rex_COMMITMENTSDetailsTable" xlink:to="dei_LegalEntityAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="dei_EntityDomain_0" xlink:href="https://xbrl.sec.gov/dei/2026/dei-2026.xsd#dei_EntityDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="dei_LegalEntityAxis" xlink:to="dei_EntityDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OneEarthEnergyAndNuGenEnergyMember" xlink:href="rex-20260131.xsd#rex_OneEarthEnergyAndNuGenEnergyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_OneEarthEnergyAndNuGenEnergyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OneEarthEnergyMember" xlink:href="rex-20260131.xsd#rex_OneEarthEnergyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityDomain" xlink:to="rex_OneEarthEnergyMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_RenewalMember" xlink:href="rex-20260131.xsd#rex_RenewalMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeaseContractualTermDomain" xlink:to="rex_RenewalMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_ForwardPurchaseContractsQuantity" xlink:href="rex-20260131.xsd#rex_ForwardPurchaseContractsQuantity"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="rex_ForwardPurchaseContractsQuantity" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfNaturalGasUnderSalesCommitment" xlink:href="rex-20260131.xsd#rex_QuantityOfNaturalGasUnderSalesCommitment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="rex_QuantityOfNaturalGasUnderSalesCommitment" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfEthanolUnderSalesCommitment" xlink:href="rex-20260131.xsd#rex_QuantityOfEthanolUnderSalesCommitment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="rex_QuantityOfEthanolUnderSalesCommitment" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfDistillersGrainsUnderSalesCommitment" xlink:href="rex-20260131.xsd#rex_QuantityOfDistillersGrainsUnderSalesCommitment"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="rex_QuantityOfDistillersGrainsUnderSalesCommitment" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments" xlink:href="rex-20260131.xsd#rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="rex_QuantityOfNonFoodGradeCornOilUnderSalesCommitments" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PaymentsToAcquireProjects" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PaymentsToAcquireProjects"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="us-gaap_PaymentsToAcquireProjects" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_LeaseExpirationPeriod" xlink:href="rex-20260131.xsd#rex_LeaseExpirationPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="rex_LeaseExpirationPeriod" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_InstallmentAmount" xlink:href="rex-20260131.xsd#rex_InstallmentAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="rex_InstallmentAmount" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MarketingExpense" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MarketingExpense"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="rex_COMMITMENTSDetailsLineItems" xlink:to="us-gaap_MarketingExpense" order="9" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/INCOMETAXESDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_IncomeTaxDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_IncomeTaxDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsRegulatoryAssetsAndLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsRegulatoryAssetsAndLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsRegulatoryAssetsAndLiabilities" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxLiabilitiesRegulatoryAssetsAndLiabilities" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxLiabilitiesRegulatoryAssetsAndLiabilities"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxLiabilitiesRegulatoryAssetsAndLiabilities" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DeferredTaxAssetsTaxCreditCarryforwards"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_DeferredTaxAssetsTaxCreditCarryforwards" order="2" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_OperatingLossCarryorwardsExpirationYear" xlink:href="rex-20260131.xsd#rex_OperatingLossCarryorwardsExpirationYear"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_OperatingLossCarryorwardsExpirationYear" order="3" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_OperatingLossCarryforwardsValuationAllowance" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_OperatingLossCarryforwardsValuationAllowance"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_OperatingLossCarryforwardsValuationAllowance" order="4" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount" order="5" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_TaxCreditCarryforwardAmount" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_TaxCreditCarryforwardAmount"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_TaxCreditCarryforwardAmount" order="6" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_TaxCreditCarryforwardExpirationPeriod" xlink:href="rex-20260131.xsd#rex_TaxCreditCarryforwardExpirationPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_TaxCreditCarryforwardExpirationPeriod" order="7" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_UnrecognizedTaxBenefitsWithoutAccruedPenaltiesAndInterest" xlink:href="rex-20260131.xsd#rex_UnrecognizedTaxBenefitsWithoutAccruedPenaltiesAndInterest"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_UnrecognizedTaxBenefitsWithoutAccruedPenaltiesAndInterest" order="8" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued" order="9" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_IncreaseDecreaseInIncomeTaxExpenseBenefitIfUnrecognizedTaxBenefitsAreRecognized" xlink:href="rex-20260131.xsd#rex_IncreaseDecreaseInIncomeTaxExpenseBenefitIfUnrecognizedTaxBenefitsAreRecognized"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxDisclosureAbstract" xlink:to="rex_IncreaseDecreaseInIncomeTaxExpenseBenefitIfUnrecognizedTaxBenefitsAreRecognized" order="10" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/CONTINGENCIESDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_CommitmentsAndContingenciesDisclosureAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_CommitmentsAndContingenciesDisclosureAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LossContingencyLossInPeriod" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LossContingencyLossInPeriod"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_CommitmentsAndContingenciesDisclosureAbstract" xlink:to="us-gaap_LossContingencyLossInPeriod" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/RELATEDPARTIESDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_RelatedPartyTransactionLineItems" xlink:to="us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable" xlink:to="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="us-gaap_RelatedPartyMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_PurchaseOfCornAndOtherSuppliesFromAffiliates" xlink:href="rex-20260131.xsd#rex_PurchaseOfCornAndOtherSuppliesFromAffiliates"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionLineItems" xlink:to="rex_PurchaseOfCornAndOtherSuppliesFromAffiliates" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccountsPayableCurrentAndNoncurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccountsPayableCurrentAndNoncurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionLineItems" xlink:to="us-gaap_AccountsPayableCurrentAndNoncurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ProceedsFromMinorityShareholders" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ProceedsFromMinorityShareholders"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyTransactionLineItems" xlink:to="us-gaap_ProceedsFromMinorityShareholders" order="2" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://www.rexamerican.com/role/SEGMENTREPORTINGDetails" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentReportingInformationLineItems" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <loc xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" order="0" xbrldt:contextElement="segment" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" order="10" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_RelatedPartyDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_RelatedPartyDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:to="us-gaap_RelatedPartyDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="11" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_SegmentDomain_0" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_SegmentDomain"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_0" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RelatedPartyDomain" xlink:to="us-gaap_MajorityOwnedSubsidiaryUnconsolidatedMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolAndByProductsMember" xlink:href="rex-20260131.xsd#rex_EthanolAndByProductsMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolAndByProductsMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="rex_EthanolMember" xlink:href="rex-20260131.xsd#rex_EthanolMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="rex_EthanolMember" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_NumberOfReportableSegments" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_NumberOfReportableSegments"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_NumberOfReportableSegments" order="0" xbrldt:closed="true"/>
  </definitionLink>
  <definitionLink xlink:role="http://fasb.org/srt/role/srt-eedm/ExtensibleEnumerationLists" xlink:type="extended">
    <loc xlink:type="locator" xlink:label="us-gaap_DepreciationMethodDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_DepreciationMethodDomain"/>
    <loc xlink:type="locator" xlink:label="us-gaap_StraightLineDepreciationMethodMember" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_StraightLineDepreciationMethodMember"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DepreciationMethodDomain" xlink:to="us-gaap_StraightLineDepreciationMethodMember" order="0" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_LiabilitiesAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_LiabilitiesAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LiabilitiesAbstract" xlink:to="us-gaap_AccruedLiabilitiesCurrent" order="1" xbrldt:closed="true"/>
    <loc xlink:type="locator" xlink:label="us-gaap_AssetsAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_AssetsAbstract"/>
    <loc xlink:type="locator" xlink:label="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2026/elts/us-gaap-2026.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
<!-- [WMV6][XOFnE7zj4VJ0yIUYTVRnCkMhQdm3ZX1Zl6B2rMgj2LZQ1fOQCZfQHZ5GyZaEL2V+PZoVkm/MP2ujoTYcnFyH1i2PWO0T30vPyU3g6bCUKUiret00LaEBSLnFBKc6wm142lcQarYrdCMbkaI1XqE8N8kTh23goWS/JMcb5HSBpDUh7hFttJZJL/ayzCKYwoP3TjBZFb86ObgYfdvTcA7VCxCRYrGUeeexK2WBwKx/pmYs0XGFx7IJ6SoZOy+d4+1hsOH+/EBEQMvekXoFqI1CqJSGZwHl2N6JQyJKkP7/NAWXftE6L1CWEoe+N+klimLeFoge2RLYPfZQRj9JXA==] CSR-->
    <definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AssetsAbstract" xlink:to="us-gaap_PrepaidExpenseAndOtherAssetsCurrent" order="2" xbrldt:closed="true"/>
  </definitionLink>
</linkbase>
